Owning Palette: Additional String VIs and Functions
Requires: Base Development System
Divides a single string into two substrings.
You can divide the string at a certain character or substring. Search/Split String searches string for the string or character in search string/char. The function splits the string and returns the resulting two strings in substring before match and match + rest of string.
Add to the block diagram | Find on the palette |
If you enable the Match Single Character option, this function uses only the first character in search string/char and searches string for this character. When finding the first match in string, this function splits string and returns the resulting two strings. To enable the Match Single Character option, right-click this function and select Match Single Character from the shortcut menu.
For example, when you specify Test string for string and str for search string/char, this function returns different resulting strings depending on whether you enable the Match Single Character option. The following table shows the resulting strings.
Match Single Character Disabled | Match Single Character Enabled | |
---|---|---|
substring before match | Test | Te |
match + rest of string | string | st string |