[Swift-commit] r6348 - trunk/docs/userguide
ketan at ci.uchicago.edu
ketan at ci.uchicago.edu
Fri Mar 8 01:01:04 CST 2013
Author: ketan
Date: 2013-03-08 01:01:03 -0600 (Fri, 08 Mar 2013)
New Revision: 6348
Modified:
trunk/docs/userguide/mappers
Log:
fixing the example on regexp and struct regexp mappers
Modified: trunk/docs/userguide/mappers
===================================================================
--- trunk/docs/userguide/mappers 2013-03-08 05:23:36 UTC (rev 6347)
+++ trunk/docs/userguide/mappers 2013-03-08 07:01:03 UTC (rev 6348)
@@ -631,14 +631,12 @@
Example:
----
-string s = "picture.gif";
-file f <regexp_mapper;
- source=s,
- match="(.*)gif",
- transform="\\1jpg">;
+file s <"picture.gif">;
+file f <regexp_mapper; source=s,
+ match="(.*)gif", transform="\\1jpg">;
----
-This example transforms a string ending gif into one ending jpg and
+This example transforms a file ending gif into one ending jpg and
maps that to a file.
[options="header, autowidth"]
@@ -649,9 +647,10 @@
structured regular expression mapper
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The structured_regexp_mapper is similar to the regexp_mapper. The
-structured_regexp_mapper can be applied to lists while the regexp_mapper cannot.
+The structured_regexp_mapper is similar to the regexp_mapper with the only
+difference that it can be applied to arrays while the regexp_mapper cannot.
+
[options="header, autowidth"]
|==========
|parameter|meaning
@@ -667,14 +666,13 @@
Example:
----
-string s[] = ["picture.gif", "hello.gif", "world.gif"];
-file f[] <structured_regexp_mapper;
- source=s,
- match="(.*)gif",
- transform="\\1jpg">;
+file s[] <filesys_mapper; pattern="*.gif">;
+
+file f[] <structured_regexp_mapper; source=s,
+ match="(.*)gif", transform="\\1jpg">;
----
-This example transforms all strings in a list that end in gif to end in jpg and maps
+This example transforms all files in a list that end in gif to end in jpg and maps
the list to those files.
csv mapper
More information about the Swift-commit
mailing list