2.1.2 Character and String Manipulation


Functions

Name Brief Example
_stricmp The _stricmp (alias stricmp) function compares lowercase versions of two character strings. Examples
append_blanks_to_size It appends the' ' characters to the string until its size reaches nSize.If the size of the string is bigger than nSize, the function will not append nor modify the original string. Examples
check_convert_CR_str_to_CRLF Convert all "\n" end-of-lines sequences to "\r\n" in a string. Examples
count_list Count a string list ,then construct a string vector and an appearance frequency vector for all duplicate occurences Examples
find_any_of_characters_in_str find any one of the specified characters in a string and return its pointer Examples
find_end_char_number Find the repeat appearance times of the end character at the end of a string. Examples
find_in_list Look for the given double or int value in list of numeric values Examples
find_prefix_char_number Find the repeat appearance times of the prefix character at the beginning of a string. Examples
get_str_from_str_list Get a specified index string from the string list separated by delimiter . Examples
GetDecimalChar GetDecimalChar is used to return the character used inside Origin for decimal in numbers Examples
init_vector_string initialize a string array, set the size as nSize, the value of all strings as strDefault. Examples
is_good_C_identifier Test if given string is a valid C or LabTalk compatible string to define a variable Examples
is_good_C_identifier_ex Test if given string is a valid C or LabTalk compatible string to define a variable Examples
is_in_list check and see if given string is in list Examples
is_repeat_str Get the repeat times of basic substring in a given string Examples
is_str_has_path Test the string to see if it begins with a file path, this function does not care whether the file exists or not. Examples
is_str_has_space Test a string to see if it has any white space character. Only ASCII space, CR and LF characters are tested but multibyte string can be supported. Examples
is_str_match_begin Check if a string begins with a particular string Examples
is_str_match_begin_of_word Check to see if a string is the start part of a word in a longer string Examples
is_str_numeric Check and convert a string to a double Examples
is_str_numeric_integer Check and convert a string to an integer Examples
is_str_numeric_integer_with_args Check and convert the substring before the separator token to an integer and return the remaining string Examples
is_str_valid_file_path Test a string to see if it is in correct form for a file name (full path) this function does not care whether the file existed or not Examples
IsCharAlpha This function determines whether a character is an alphabetic character. Examples
lstrcat The lstrcat (alias strcat) function append characters of a string. Examples
lstrcmp The lstrcmp (alias strcmp) function compares two character strings. The comparison is case sensitive. Examples
lstrcmpi The lstrcmpi (alias stricmp) function compares two character strings. The comparison is not case sensitive. Examples
lstrcpy The lstrcpy (alias strcpy) function copies a string to a buffer. Examples
lstrcpyn The lstrcpyn (alias strncpy) function copies a specified number of characters from a source string into a buffer. Examples
lstrlen The lstrlen (alias strlen) function returns the length of a string in bytes(not including the terminating null character). Examples
memchr Find a pointer to first occurrence of character. Examples
memcmp Compares characters between two buffers. Examples
memcpy Copy characters between buffers. Examples
memmove Move contents of one buffer to another. Examples
memory_replace Replace all occurances of certain characters in given buffer with a new character Examples
memset Set buffers to a specified character. Examples
okutil_find_strings Finds all strings in an array that match a given test string.

The test string may contain wild characters * and ?.

Examples
okutil_get_tokens get the tokens from the string Examples
okutil_is_in_list check and see if given string is in list Examples
okutil_search_text search keywords in text Examples
remove_if_in_list Filter a vector of strings by another , remove all those elements that are in the second list from the first vector. Examples
remove_if_not_in_list Filter a vector of strings by another , remove all those elements that are not in the second list from the first vector. Examples
remove_repeat_item Remove the repeat items in a string list Examples
remove_str_from_str_list Remove a specified string from the string list separated by delimiter. Examples
separate_file_name_ext Check to see if the given file name has file extension name. if so, separate and get them. Examples
sprintf Write data into a string according to a standard C format specification. Examples
sscanf Read data from a string according to a standard C format specification. Examples
str_combine Combine the elements in a string vector to a new string. Examples
str_end_char get the last char of a string Examples
str_pad_char pad a string with given charactor. Examples
str_separate Seperate the string to some new strings with the seperator. Examples
strcat Append a string. Examples
strchr Find a character in a string. Examples
strcmp Compare strings. Examples
strcpy Copy a string. Examples
strcspn Find a substring in a string. Examples
strerror Get a system error message. Examples
string_to_prefix_end_number Break the given string into prefix string and a terminating integer. Examples
strlen Get the length of a string in bytes(not including the terminating null character). Examples
strncat Append characters of a string. Examples
strncmp Compare the first N characters of two strings. Examples
strncpy Copy characters of one string to another. Examples
strpbrk Scan strings for characters in specified character sets. Examples
strrchr Scan a string for the last occurrence of a character. Examples
strspn Find the first substring. Examples
strstr Find a substring. Examples
strtok Find the next token in a string. Examples
tolower Convert uppercase letter to lowercase. Examples
toupper Convert lowercase letter to uppercase. Examples