简体   繁体   中英

Igor pro string manipulation function documentation

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?

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, use SelectString
  • Lists of strings are plain strings with a single character separator
  • Key value pairs are managed with StringByKey/ReplaceStringByKey/NumberByKey

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM