Stringe
A set of useful functions for String manipulation.
Documentation Stringe
Zero Fill
(Stringe.zfill(String strNum, int size) -> String)
Returns a string of length size filled with 0 values at the beginning (strNum must be numeric and size must be greater than strNum's length).
strNum: "25", size: 5 -> "00025"
Left Fill
(Stringe.leftFill(String str, int size) -> String)
Returns a string of length size filled with " " values at the left (size must be greater than str's length).
str: "Hello", size: 10 -> " Hello"
Left Fill
(Stringe.leftFill(String str, int size, char chr) -> String)
Returns a string of length size filled with regex values at the left (size must be greater than str's length).
str: "Hello", size: 10, chr: '=' -> "=====Hello"
Right Fill
(Stringe.rightFill(String str, int size) -> String)
Returns a string of length size filled with " " values at the right (size must be greater than str's length).
str: "Hello", size: 10 -> "Hello "
Right Fill
(Stringe.rightFill(String str, int size, char chr) -> String)
Returns a string of length size filled with regex values at the right (size must be greater than str's length).
str: "Hello", size: 10, chr: '=' -> "Hello====="
Is Numeric
(Stringe.isNumeric(String strNum) -> boolean)
Returns true if strNum is numeric.
strNum: "23.76" -> true
strum: "Hello" -> false
Count
(Stringe.count(String str, char toFound) -> int)
Returns the times a char is found in a String.
str: "Hello World", toFound: 'l' -> 3
Count
(Stringe.count(String str, String toFound) -> int)
Returns the times a String is found in a String.
str: "Hello World", toFound: "ell" -> 1
Center
(Stringe.center(String str, int length) -> String)
Returns a centered String with " " values in a specified length.
str: "Hello World", length: 15 -> " Hello World "
Center
(Stringe.center(String str, int length, char chr) -> String)
Returns a centered String with chr values in a specified length.
str: "Hello World", length: 15, chr: '=' -> "==Hello World=="
Title
(Stringe.title(String str) -> String)
Returns a String in title format (The first letter of every word in upper case and the rest in lower case).
str: "hello world" -> "Hello World"
Paragraph
(Stringe.paragraph(String str) -> String)
Returns a String in paragraph format (The first letter in upper case and the rest in lower case).
str: "hello world" -> "Hello world"