Nelson banner
String type

The String Type module provides functions for creating, manipulating, and analyzing text in Nelson.

It supports conversion between character arrays and string arrays, concatenation, trimming, justification, and case conversion.

The module also includes functions for searching, matching, replacing, and formatting strings, enabling flexible text processing for both simple and complex string operations.

Create and Convert Text

Functions for creating text, formatting text, and converting between text and other data.

Text Properties

Functions for checking text type, length, and character properties.

  • isStringScalar
    checks if input is string array with one element.
  • isletter
    Determine which characters are letters.
  • isspace
    Determine which characters are space.
  • isstrprop
    Determine character categories.
  • strlength
    Length of strings in cell of strings or string array.
Find and Replace

Functions for locating, counting, erasing, and replacing text.

  • contains
    checks if string contains with pattern.
  • count
    Computes the number of occurrences of an pattern.
  • endsWith
    checks if string ends with pattern.
  • erase
    Erase matching text.
  • eraseBetween
    Erase text between boundaries.
  • findstr
    Find one character vector inside another.
  • replace
    Replaces strings in another.
  • replaceBetween
    Replace text between boundaries.
  • startsWith
    checks if string starts with pattern.
  • strfind
    Find a string in another.
  • strmatch
    Find strings that start with text.
  • strrep
    Replaces strings in another.
Patterns

Pattern-building functions and boundary definitions for text matching.

Regular Expressions

Regular expression search, replacement, translation, and pattern helpers.

Join, Split, and Extract

Functions for extracting parts of text and combining or splitting text values.

Edit Text

Functions for trimming, padding, inserting, reversing, and changing text case.

  • deblank
    Remove trailing whitespace.
  • insertAfter
    Insert text after a boundary.
  • insertBefore
    Insert text before a boundary.
  • lower
    Convert text to lowercase.
  • pad
    Pad text to a requested width.
  • reverse
    Reverse characters in text.
  • strip
    Remove leading and trailing characters from text.
  • strjust
    Justify strings
  • strtrim
    Remove leading and trailing whitespace.
  • tolower
    Lower case conversion.
  • toupper
    Upper case conversion.
  • upper
    Convert text to uppercase.
Compare Text

Functions for comparing and matching text values.

  • matches
    Determine if pattern matches with strings.
  • strcmp
    Strings comparison.
  • strcmpi
    Strings comparison (case insensitive).
  • strncmp
    Compares first n characters of strings.
  • strncmpi
    Compares first n characters of strings (case sensitive).