Map string
De MappingDoc
Révision datée du 6 mars 2019 à 09:11 par imported>Admin (1 révision importée)
map_string
Work with character strings.
To count characters in the string
-skip:AAA : Skip AAA characters from beginning [ -from:BBB ] : Skip AAA characters from BBBth e.g. > map_string -skip:4 -from:2 -data:abcdefSTRING STRING -cutafter:AAA => cut after AAA characters e.g. > map_string -cutafter:6 -data:STRINGabcdefgh STRING
Based on separators in the string
-begin_sep:XXX => separator at the start of sub-string [ -nb_begin_sep_to_skip:AA ] => ignores the first AA characters (from string start) -end_sep:XXX => separator at the end of sub-string [ -nb_end_sep_to_skip:AA ] => ignores the first AA characters (from sub-string start)
To cut chains based on a separator
-cut:SEP => field separator -f:CHAMP => field to be kept
To retrieve the path or filename
-basename -data:PATH_FILE => return filename (without extension on Windows) -basenameext -data:PATH_FILE => return filename (with extension on Windows) -dirname -data:PATH_FILE => return path e.g. (Windows) : > map_string -basename -data:C:\apps\mapping\bin\map_daemon.exe map_daemon > map_string -basenameext -data:C:\apps\mapping\bin\map_daemon.exe map_daemon.exe > map_string -dirname -data:C:\apps\mapping\bin\map_daemon.exe C:\apps\mapping\bin