---
category: [Administration & Integrations, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions, Platform and Product Extensions/Integration]
keyword: [Integrate, Workday Integration, Orchestrate for Integrations, Orchestration, Orchestration Builder]
nav: wcp_docs
parent_url: /wcp_docs/
title: >- 
  Reference: Text Member Functions
layout: subsection
---

<a id="d207e161"></a>
<b>Instance Type: Text</b>

<table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td>batchIteratorByContainsAfter</td><td>Arguments: <ul><li>contains (String)
</li></ul> <p>Return Type:</p><ul><li>TextIterator
</li></ul> <p>Returns an iterator of TextType instance batches. The batch is created after lines that contain the specified string.</p></td></tr><tr><td>batchIteratorByContainsAfter</td><td>Arguments: <ul><li>contains (String)
</li><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>TextIterator
</li></ul> <p>Returns an iterator of TextType instance batches. The batch is created after lines that contain the specified string. The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>batchIteratorByContainsAt</td><td>Arguments: <ul><li>contains (String)
</li></ul> <p>Return Type:</p><ul><li>TextIterator
</li></ul> <p>Returns an iterator of TextType instance batches. The batch is created at lines that contain the specified string.</p></td></tr><tr><td>batchIteratorByContainsAt</td><td>Arguments: <ul><li>contains (String)
</li><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>TextIterator
</li></ul> Returns an iterator of TextType instance batches. The batch is created at lines that contain the specified string. The lineEnding parameter defines the end of a line.</td></tr><tr><td>batchIteratorByEndsWithAfter</td><td>Arguments: <ul><li>endsWith (String)
</li></ul> <p>Return Type:</p><ul><li>TextIterator
</li></ul> <p>Returns an iterator of TextType instance batches. The batch is created after lines that end with the specified string.</p></td></tr><tr><td>batchIteratorByEndsWithAfter</td><td>Arguments: <ul><li>endsWith (String)
</li><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>TextIterator
</li></ul> <p>Returns an iterator of TextType instance batches. The batch is created after lines that end with the specified string. The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>batchIteratorByEndsWithAt</td><td>Arguments: <ul><li>endsWith (String)
</li></ul> <p>Return Type:</p><ul><li>TextIterator
</li></ul> <p>Returns an iterator of TextType instance batches. The batch is created at lines that end with the specified string.</p></td></tr><tr><td>batchIteratorByEndsWithAt</td><td>Arguments: <ul><li>endsWith (String)
</li><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>TextIterator
</li></ul> <p>Returns an iterator of TextType instance batches. The batch is created at lines that end with the specified string. The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>batchIteratorByStartsWithAfter</td><td>Arguments: <ul><li>startsWith (String)
</li></ul> <p>Return Type:</p><ul><li>TextIterator
</li></ul> <p>Returns an iterator of TextType instance batches. The batch is created after lines that start with the specified string.</p></td></tr><tr><td>batchIteratorByStartsWithAfter</td><td>Arguments: <ul><li>startsWith (String)
</li><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>TextIterator
</li></ul> <p>Returns an iterator of TextType instance batches. The batch is created after lines that start with the specified string. The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>batchIteratorByStartsWithAt</td><td>Arguments: <ul><li>startsWith (String)
</li></ul> <p>Return Type:</p><ul><li>TextIterator
</li></ul> <p>Returns an iterator of TextType instance batches. The batch is created at lines that start with the specified string.</p></td></tr><tr><td>batchIteratorByStartsWithAt</td><td>Arguments: <ul><li>startsWith (String)
</li><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>TextIterator
</li></ul> <p>Returns an iterator of TextType instance batches. The batch is created at lines that start with the specified string. The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>dropFirstAndLastLines</td><td>Arguments: <ul><li>firstN (Number)
</li><li>lastN (Number)
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns a new TextType instance with the first n and last n lines removed.</p></td></tr><tr><td>dropFirstAndLastLines</td><td>Arguments: <ul><li>firstN (Number)
</li><li>lastN (Number)
</li><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns a new TextType instance with the first n and last n lines removed. The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>dropFirstLines</td><td>Arguments: <ul><li>firstN (Number)
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns a new TextType instance with the first n lines removed.</p></td></tr><tr><td>dropFirstLines</td><td>Arguments: <ul><li>firstN (Number)
</li><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns a new TextType instance with the first n lines removed. The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>dropLines</td><td>Arguments: <ul><li>n (Number)
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns a new TextType instance with the specified number of lines removed from the end.</p></td></tr><tr><td>dropLines</td><td>Arguments: <ul><li>n (Number)
</li><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns a new TextType instance with the specified number of lines removed from the end. The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>dropLines</td><td>Arguments: <ul><li>from (Number)
</li><li>to (Number)
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns a new TextType instance with the lines between the specified points removed.</p></td></tr><tr><td>dropLines</td><td>Arguments: <ul><li>from (Number)
</li><li>to (Number)
</li><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns a new TextType instance with the lines between the specified points removed. The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>escapeToJsonString</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns the text escaped for JSON so it can be inserted into a document as a JSON field string value.</p><p><b>Note:</b> This function doesn't surround the resulting string with double quotes. Use toJsonStringValue to do that.</p></td></tr><tr><td>firstLine</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns the first line as a StringType instance.</p></td></tr><tr><td>firstLine</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns the first line as a StringType instance.The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>htmlToPlainText</td><td>Arguments: <ul><li>None
</li></ul> Return type: <ul><li>Text
</li></ul> Returns HTML input as readable plain text. Block-level elements (p, div, br, li, h1-h6) each produce a line break. Runs of consecutive block-level boundaries collapse to a single line break. Leading and trailing line breaks are trimmed. Inline elements are removed, retaining their text content. Runs of whitespace are collapsed to a single space. HTML entities are decoded. Example: "<p>First<br/><b>Second</b></p>" returns "First\nSecond".</td></tr><tr><td>includeCharactersUsingList</td><td>Arguments: <ul><li>inclusionList (StringListType)
</li><li>defaultReplacement (StringType)
</li></ul> Return type: <ul><li>Text
</li></ul> Returns a text file, replacing any characters not present in the inclusion list with the specified replacement. Characters that are on the inclusion list are returned unchanged.</td></tr><tr><td>lastLine</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns the last line as a StringType instance.</p></td></tr><tr><td>lastLine</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns the last line as a StringType instance.The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>line</td><td>Arguments: <ul><li>n (Number)
</li></ul> <p>Return Type:</p><ul><li>String
</li></ul> <p>Returns the line at the specified line number as a StringType instance.</p></td></tr><tr><td>line</td><td>Arguments: <ul><li>n (Number)
</li><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>String
</li></ul> <p>Returns the line at the specified line number as a StringType instance. The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>lineCount</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Number
</li></ul> <p>Returns the number of lines in this TextType instance.</p></td></tr><tr><td>lineCount</td><td>Arguments: <ul><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>Number
</li></ul> <p>Returns the number of lines in this TextType instance. The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>lines</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>StringIterator
</li></ul> <p>Returns an iterator of StringIteratorType, which when used in a loop provides each line of text as a StringType instance.</p></td></tr><tr><td>lines</td><td>Arguments: <ul><li>from (Number)
</li><li>to (Number)
</li></ul> <p>Return Type:</p><ul><li>StringIterator
</li></ul> <p>Returns an iterator of StringIteratorType, which when used in a loop provides each line of text as a StringType instance. Skips the lines between the specified points.</p></td></tr><tr><td>lines</td><td>Arguments: <ul><li>from (Number)
</li></ul> <p>Return Type:</p><ul><li>StringIterator
</li></ul> <p>Returns an iterator of StringIteratorType, which when used in a loop provides each line of text as a StringType instance. Starts at the specified point.</p></td></tr><tr><td>lines</td><td>Arguments: <ul><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>StringIterator
</li></ul> <p>Returns an iterator of StringIteratorType, which when used in a loop provides each line of text as a StringType instance. The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>lines</td><td>Arguments: <ul><li>from (Number)
</li><li>to (Number)
</li><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>StringIterator
</li></ul> <p>Returns an iterator of StringIteratorType, which when used in a loop provides each line of text as a StringType instance. Starts at the specified point. Skips the lines between the specified points. The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>lines</td><td>Arguments: <ul><li>from (Number)
</li><li>lineEnding (String)
</li></ul> <p>Return Type:</p><ul><li>StringIterator
</li></ul> <p>Returns an iterator of StringIteratorType, which when used in a loop provides each line of text as a StringType instance. Starts at the specified point. The lineEnding parameter defines the end of a line.</p></td></tr><tr><td>removeEmptyLines</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns the text with empty lines removed. Works with \n, \r and \r\n line endings.</p></td></tr><tr><td>removeEmptyLines</td><td>Arguments: <ul><li>lineSeparator (String)
</li></ul> <p>Return Type:</p><ul><li>Text
</li></ul> <p>Returns the text with empty lines removed according to the specified line separator.</p></td></tr><tr><td>replaceAndIncludeCharacters</td><td>Arguments: <ul><li>mapping (StringMapType)
</li><li>defaultReplacement (StringType)
</li></ul> Return type: <ul><li>Text
</li></ul> Returns a text file with characters replaced according to the provided mapping. If a character is missing from the provided document, the default string is returned in its place. Spaces and new lines are returned unchanged.</td></tr><tr><td>replaceCharactersUsingMapping</td><td>Arguments: <ul><li>mapping (StringMapType)
</li></ul> Return types: <ul><li>Text
</li></ul> Returns a text file with characters replaced according to the provided mapping. If a character isn't mapped, it's returned unchanged.</td></tr><tr><td>stripHtmlTags</td><td>Arguments: <ul><li>None
</li></ul> Return types: <ul><li>Text
</li></ul> Returns the input text with all HTML/XML tags removed. Does not decode HTML entities. Example: "Hello <b>world</b>" returns "Hello world".</td></tr><tr><td>toJsonStringValue</td><td>rguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Json
</li></ul> <p>Returns the text escaped for JSON and surrounded in double quotes so it can be inserted into a JSON document as a field string value.</p></td></tr></tbody></table><br/>

