I am trying to find documentation for string manipulation in igor pro. In particular, for functions for appending and stripping elements from strings. Does igor pro have such built in functions and is there somewhere that lists all the string mananipulation functions in igor pro?
Asked
Active
Viewed 2,218 times
1 Answers
1
Basic string manipulation:
string str = "abcd"
print str[1,inf] // prints bcd
string suffix = "1234"
str += suffix
print str // prints abcd1234
String functions:
cmpstr: Compare two strings for equality
strlen: Length of a string
str2num/num2str/num2istr: Convert from/to strings
LowerStr/UpperStr: Change case
strsearch: Search inside a string
StringMatch/GrepString: Fancy string matching using wildcards/regexps
RemoveEnding: Removes a known suffix from a string
All string functions are listed in V-10 of the PDF manual.
Igor specialities:
strswitch
is a switch statement for strings- The ternary operator (
? :
) can not be used with strings, useSelectString
- Lists of strings are plain strings with a single character separator
- Key value pairs are managed with
StringByKey/ReplaceStringByKey/NumberByKey

t-b
- 152
- 1
- 7