OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis                     
 
Skip Navigation Links
All BooksExpand All Books
LabTalk ProgrammingExpand LabTalk Programming
Language ReferenceExpand Language Reference
Function ReferenceExpand Function Reference
String and Character FunctionsExpand String and Character Functions

3.5.5 String and Character Functions

Note:
  • All of the following functions are available only in Origin 8 SR6 or later version!
  • You can also use methods in String object to work with strings.
  • String concatenation operator (+) can be used to concatenate two strings.
Name Brief Example
asc Returns the ASCII value of the uppercase character in parentheses.
Char Return the character specified by the code number. Example
Code Return a numeric code for the first character in input string. Example
Compare Compare str1 with str2, identical will return 1. Example
EnvVar Returns the string value stored in the windows environment variable. Example
Exact Return TRUE if both strings are an exact match (case and length). Example
Find Finds a string within another string. Case sensitive. No wildcards. Example
Format Convert double to string with LabTalk formatting option. Superseded in 9.1 by Text function. Examples
Left Returns the leftmost n characters from the string. Example
Len Returns the number of characters of a string str. Example
Lower Converts the string to lowercase. Example
MakeCSV This function converts a string which has an identical delimiter into CSV format. Example
Match Compares the string find$ with another string within$ to see whether their contents match with each other. Example
MatchBegin Finds a string pattern within a string. Supports * and ? wildcard characters. Optionally, case-sensitive. Example
MatchEnd Finds a string pattern within a string (str1). Supports * and ? wildcard characters. Optionally, case-sensitive. Example
Mid Returns a specific number of characters n2 from the string str, starting at the specific position n1. If n2 is not specified, returns everything from n1 to the end of the string. Example
Replace Replace n2 characters in string1 starting at n1th position with string2. Example
Right Returns the rightmost n characters from the string. Example
Search Finds a string within another string. Not case sensitive. No wildcards. See MatchBegin. Example
Substitute Substitute string3 with string2 when found in string1. Example
Text Convert double to string with LabTalk formatting option. Examples
Token Get the Nth token using specified delimiter from a string. Example
Trim Removes spaces from string. Example
Upper Converts the string to uppercase. Example
Value Converts the string number to double. Example
 

© OriginLab Corporation. All rights reserved.