Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

String Functions

LabVIEW 2011 Help

Edition Date: June 2011

Part Number: 371361H-01

»View Product Info

Owning Palette: Programming VIs and Functions

Requires: Base Package. This topic might not match its corresponding palette in LabVIEW depending on your operating system, licensed product(s), and target.

Use the String functions to concatenate two or more strings, extract a subset of strings from a string, convert data into strings, and format a string for use in a word processing or spreadsheet application.

Palette ObjectDescription
Array To Spreadsheet StringConverts an array of any dimension to a table in string form, containing tabs separating column elements, a platform-dependent EOL character separating rows, and, for arrays of three or more dimensions, headers separating pages.
Build TextCreates an output string from a combination of text and parameterized inputs. If the input is not a string, this Express VI converts the input into a string based on the configuration of the Express VI.
Carriage Return ConstantConsists of a constant string containing the ASCII CR value.
Concatenate StringsConcatenates input strings and 1D arrays of strings into a single output string. For array inputs, this function concatenates each element of the array.
Empty String ConstantConsists of a constant string that is empty (length zero).
End of Line ConstantConsists of a constant string containing the platform-dependent end-of-line value.
Format Date/Time StringDisplays a timestamp value or a numeric value as time in the format you specify using time format codes. For example, %c displays locale-specific date/time. Time-related format codes include the following: %X (locale-specific time), %H (hour, 24-hour clock), %I (hour, 12-hour clock), %M (minute), %S (second), %<digit>u (fractional seconds with <digit> precision), and %p (a.m./p.m. flag). Date-related format codes include the following: %x (locale-specific date), %y (year within century), %Y (year including century), %m (month number), %b (abbreviated month name), %d (day of month), and %a (abbreviated weekday name).
Format Into StringFormats string, path, enumerated type, time stamp, Boolean, or numeric data as text.
Line Feed ConstantConsists of a constant string containing the ASCII LF value.
Match PatternSearches for regular expression in string beginning at offset, and if it finds a match, splits string into three substrings. A regular expression requires a specific combination of characters for pattern matching. For more information about special characters in regular expressions, refer to the regular expression input description in the detailed help.
Match Regular ExpressionSearches for a regular expression in the input string beginning at the offset you enter and, if it finds a match, splits the string into three substrings and any number of submatches. Resize the function to view any submatches found in the string.
Replace SubstringInserts, deletes, or replaces a substring at the offset you specify in string.
Scan From StringScans the input string and converts the string according to format string.
Search and Replace StringReplaces one or all instances of a substring with another substring. To include the multiline? Boolean input, right-click the function and select Regular Expression.
Space ConstantUse this constant to supply a one-character space string to the block diagram.
Spreadsheet String To ArrayConverts the spreadsheet string to an array of the dimension and representation of array type. This function works for arrays of strings and arrays of numbers.
String ConstantUse this constant to supply a constant text string to the block diagram.
String LengthReturns in length the number of characters (bytes) in string.
String SubsetReturns the substring of the input string beginning at offset and containing length number of characters.
Tab ConstantConsists of a constant string containing the ASCII HT (horizontal tab) value.
To Lower CaseConverts all alphabetic characters in string to lowercase characters. Evaluates all numbers in string as ASCII codes for characters. This function does not affect non-alphabetic characters.
To Upper CaseConverts all alphabetic characters in string to uppercase characters. Evaluates all numbers in string as ASCII codes for characters. This function does not affect non-alphabetic characters.
Trim WhitespaceRemoves all ASCII white space (spaces, tabs, carriage returns, and linefeeds) from the beginning, end, or both ends of string. The Trim Whitespace VI does not remove double byte characters.


SubpaletteDescription
Additional String VIs and FunctionsUse the Additional String VIs and functions to scan and search in strings, match patterns, and manipulate strings.
String/Array/Path Conversion FunctionsUse the String/Array/Path Conversion functions to convert strings, arrays, and paths.
String/Number Conversion FunctionsUse the String/Number Conversion functions to convert strings.

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit