TalendString routine - Cloud - 8.0

Talend Studio User Guide

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Cloud
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Design and Development
Last publication date
2024-02-29

The TalendString routine contains several functions which allow you to carry out various operations on alphanumerical expressions.

You can access these functions by double-clicking the TalendString node under the system routines folder in the Repository tree view.

Functions of the TalendString routine

Function

Description

Syntax

AddEscapeChars Adds a specified character before each special character (that is, a character that is not a letter, a digit, _, or space) in a string. TalendString.addEscapeChars("padding chars",'escape char')

replaceSpecialCharForXML

returns a string from which the special characters (eg.:: <, >, &...) have been replaced by equivalent XML characters.

TalendString.replaceSpecialCharForXML("string containing the special characters - eg.: Thelma & Louise")

checkCDATAForXML

identifies characters starting with <![CDATA[ and ending with ]]> as pertaining to XML and returns them without modification. Transforms the strings not identified as XML in a form which is compatible with XML and returns them.

TalendString.checkCDATAForXML("string to be parsed")

talendTrim

parses the entry string and removes the filler characters from the start and end of the string according to the alignment value specified: -1 for the filler characters at the end of the string, 1 for those at the start of the string and 0 for both. Returns the trimmed string.

TalendString.talendTrim("string to be parsed", "filler character to be removed", character position)

removeAccents

removes accents from a string and returns the string without the accents.

TalendString.removeAccents("String")

getAsciiRandomString

generates a random string with a specific number of characters.

TalendString.getAsciiRandomString(whole number indicating the length of the string)

unionString Combines the variable number of strings with a specified string separator. TalendString.unionString(String separator,Object... objects)