String handling#

String manipulation and cleaning#

lower

Converts a string to lowercase.

strcombine

Converts an NxM string array to an Nx1 string vector by combining each element in a column separated by a user-defined delimiter string.

strindx

Finds starting location of one string in another string.

strjoin

Converts an NxM string array to an Nx1 string vector by combining each element in a column separated by a user-defined delimiter string.

strlen

Returns length of a string.

strput

Lays a substring over a string.

strreplace

Replace all matches of a substring with a replacement string.

strindx

Finds starting location of one string in another string, searching from the start to the end of the string.

strrindx

Finds starting location of one string in another string, searching from the end to the start of the string.

strsect

Extracts a substring of a string.

strsplit

Splits an Nx1 string vector into an NxK string array of the individual tokens.

strsplitPad

Splits an Nx1 string vector into an NxK string array of the individual tokens. Pads on the right with null strings.

strtofcplx

Converts a string array to a complex numeric matrix.

strtrim

Strips all whitespace characters from the left and right side of each element in a string array.

strtriml

Strips all whitespace characters from the left side of each element in a string array.

strtrimr

Strips all whitespace characters from the right side of each element in a string array.

strtrunc

Truncates all elements of a string array to not longer than the specified number of characters.

strtruncl

Truncates the left side of all elements of a string array by a user-specified number of characters.

strtruncpad

Truncates all elements of a string array to the specified number of characters, adding spaces on the end as needed to achieve the exact length.

strtruncr

Truncates the right side of all elements of a string array by a user-specified number of characters.

token

Extracts the leading token from a string.

upper

Changes a string to uppercase.

String and numeric conversions#

ftos

Converts a floating point scalar to a string.

ftostrC

Converts a matrix to a string array using a C language format specification.

itos

Converts numeric integers to their string representation.

ntos

Converts a numeric matrix, or dataframe variable to a string array.

stof

Converts a string to floating point numbers.

strtof

Converts a string array to a numeric matrix.

isstring

Returns a 1 if the input is a string or string array, otherwise 0.

chrs

Converts ASCII values to a string.

vals

Converts a string to ASCII values.