Splitting Strings

Splitting strings divides a single string into two substrings. You can divide the string at a certain character, such as a carriage return, or at a word or phrase.

  1. Select the Search/Split String function from the Functions»String»Additional String Functions palette and place it on the block diagram.
  2. Wire the string you want to split to the string input of the Search/Split function.
  3. Enter the text that indicates where string should be split in the search string/character input of the Search/Split String function.
  4. In offset, enter the number of characters in string to skip before the Search/Split String function starts searching for the text in search string/character.
  5. Wire the substring before match and the match + rest of string outputs of the Search/Split String function to string indicators or VIs or functions that accept a string as an input.
  6. Run the VI.