Strings Manipulation

Strings Manipulation (ODC)

Stable version 0.1.0 (Compatible with ODC)
Uploaded on 22 June 2022 by Capgemini Portugal
Strings Manipulation

Strings Manipulation (ODC)

Details
Detailed Description

Strings Manipulation is a JavaScript library for manipulating string. The main purpose of this library is to gather all the string manipulating actions in one place. This action is Based on Voca JS asset done by Ivo Gonçalves.

There are 8 categories covered in this asset, each of which has associated actions:

 Case :

  • CamelCase: This action converts the input text to Camel Case;

  • Capitalize: This action converts the input text to Capitalized;

  • Decapitalize: This action converts the input text to Decapitalized;

  • KebabCase: This action converts the input text to Kebab Case;

  • LowerCase: This action converts the input text to Lower Case;

  • SnakeCase: This action converts the input text to Snake Case;

  • SwapCase: This action converts the input text to Swap Case;

  • TitleCase: This action converts the input text to Title Case;

  • UpperCase: This action converts the input text to Upper Case.

Chop:

  • CharAt: This action gives the character at position;

  • First: This action gives the first "n" characters of the input text;

  • Prune: This action truncate input text to a new length;

  • Slice: This action slices the input text between two positions;

  • SubString: This action extracts a substring from the input text between two positions;

  • Truncate: This action truncates text to a new length. 

Count:

  • Count: This action counts the number of characters in input text;

  • CountSubstrings: This action count of substrings exists in input text;

  • CountWords: This action counts the number of words in input text.

Escape:

  • EscapeHtml: This action escapes HTML special characters < > & ' " ` in html code;

  • EscapeRegExp: This action escapes the regular expression special characters - [ ] / { } ( ) * + ? . \ ^ $ | in regular expression;

  • UnescapeHtml: This action unescape  HTML special characters from &lt; &gt; &amp; &quot; &#x27; &#x60; to corresponding < > & ' " ` in unescaped HtmlText.

Index:

  • IndexOf: This action index of new text starting from position;

  • LastIndexOf: This action index of new text starting from position (backwards);

  • Search: This action search position of new text.

Manipulate:

  • Insert: This action inserts new text at position;

  • Repeat: This action repeat input text n times;

  • ReplaceText: This action replaces input text1 in input text with text2;

  • Reverse: This action reverses the input text;

  • Slugify: This action slugify the input text;

  • Splice: This action splice input text by deleting characters and adding new text;

  • Translate: This action translates input text according to the input From and input To.

  • TrimLeft: This action trim input text left;

  • TrimRight: This action trim input text right;

  • TrimText: This action trim input text.

Query:

  • EndsWith: This action allows input text ends with specified text;

  • Includes: This action allows input text include specific text;

  • IsAlpha: This action check if the input text is alpha;

  • IsAlphaDigit: This action check if the input text is alpha digit;

  • IsBlank: This action check if the input text is blank;

  • IsDigit: This action check if the input text is a digit;

  • IsEmpty: This action check if the input text is empty;

  • IsLowerCase: This action check if the input text is in lower case;

  • IsNumeric: This action check if the input text is numeric;

  • IsUpperCase: This action check if the input text is in upper case;

  • StarsWith: This action checks if the input text starts with another text.

Split

  • Spilt: This action splits the input text by splitter.