Skip to main content
Common string transformations, matching, and extraction.

string.transformCapitalization — Transform Capitalization

Inputs
PortKindTypeStructure
valuedatastringscalar
Outputs
PortKindTypeStructure
resultdatastringscalar
Config:
  • mode (string): upper (default), lower, title, abbreviation

string.contains — String Contains

Inputs
PortKindTypeStructure
haystackdatastringscalar
needledatastringscalar
Outputs
PortKindTypeStructure
containsdatabooleanscalar
Config:
  • caseSensitive (bool, default false)
  • wholeWord (bool, default false) — splits on whitespace and compares whole tokens

string.length — String Length

Counts Unicode scalar characters (not bytes). Inputs: value (data, string)
Outputs: length (data, integer)

string.wordCount — Word Count

Inputs: value (data, string)
Outputs: count (data, integer)
Config:
  • separator (string, optional)
    • If provided and empty, counts characters.
    • If provided and non-empty, counts non-empty segments after splitting.
    • If omitted, uses a CJK-aware “word” heuristic.

string.slice — String Slice

Inputs
PortKindTypeStructureNotes
valuedatastringscalar
startdataintegerscalarStart index (char index)
enddataintegerscalarOptional; end index (char index)
Outputs
PortKindTypeStructure
resultdatastringscalar

string.replace — String Replace

Inputs
PortKindTypeStructure
valuedatastringscalar
searchdatastringscalar
replacedatastringscalar
Outputs
PortKindTypeStructure
resultdatastringscalar
Config:
  • useRegex (bool, default false)
  • caseSensitive (bool, default true)
  • global (bool, default true)
Notes:
  • If regex compilation fails, the node returns the original string.

string.trim — Trim

Inputs: value (data, string)
Outputs: result (data, string)

string.split — Split

Inputs
PortKindTypeStructure
valuedatastringscalar
separatordatastringscalar
Outputs
PortKindTypeStructure
resultdatastringarray

string.join — Join

Inputs
PortKindTypeStructure
valuesdatastringarray
separatordatastringscalar
Outputs: result (data, string) Notes:
  • Non-string values in values are skipped (they do not error).

string.concat — Concatenate

Inputs: a (string), b (string)
Outputs: result (string)

string.matchesRegex — Matches Regex

Inputs: value (data, string)
Outputs: matches (data, boolean)
Config:
  • pattern (string)
  • flags (string, optional): supports i, m, s, U, x, u
Notes:
  • If regex compilation fails, matches is false.

string.extractRegex — Extract Regex

Inputs: value (data, string)
Outputs
PortKindTypeStructure
matchesdatastringarray
matcheddatabooleanscalar
Config: same as string.matchesRegex (pattern, flags)

string.detectChinese — Detect Chinese

Inputs: text (data, string)
Outputs
PortKindTypeStructure
is_chinesedatabooleanscalar
is_mixeddatabooleanscalar
Notes:
  • is_mixed only considers alphanumeric non-CJK characters (punctuation is ignored).

string.translateToChinese — Translate to Chinese

Exec node that translates text to Simplified Chinese. Inputs
PortKindTypeStructure
exec-inexec
textdatastringscalar
Outputs
PortKindTypeStructure
exec-outexec
translationdatastringscalar
Notes:
  • Requires a translator service in the backend runtime; if missing, the node errors.