org.jgap.util
Class StringKit
- java.lang.Object
-
- org.jgap.util.StringKit
-
public class StringKit extends java.lang.ObjectString-related utility functions.- Since:
- 3.2
-
-
Constructor Summary
Constructors Constructor and Description StringKit()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static java.lang.Stringdecode(java.lang.String a_string)Decodes an encoded string.static java.lang.Stringencode(java.lang.String a_string)Encodes a string.static java.lang.Stringfill(java.lang.String a_s, int a_len, char a_char)Fills a string with a given filler until length a_len is reached.static java.lang.Stringparse(java.lang.String in)Attempts to find a pattern in the given String.static java.lang.StringremoveChar(java.lang.String a_s, char a_c)Removes all occurrences of a given char from a string
-
-
-
Method Detail
-
encode
public static java.lang.String encode(java.lang.String a_string)
Encodes a string.- Parameters:
a_string- the string to encode- Returns:
- encoded string
- Since:
- 3.2
-
decode
public static java.lang.String decode(java.lang.String a_string)
Decodes an encoded string.- Parameters:
a_string- the encoded string to decode- Returns:
- decoded string
- Since:
- 3.2
-
parse
public static java.lang.String parse(java.lang.String in)
Attempts to find a pattern in the given String. Taken from UUID- Parameters:
in- the String, may not be null- Returns:
- the substring that matches this pattern or null
- Since:
- 3.3.3
-
fill
public static java.lang.String fill(java.lang.String a_s, int a_len, char a_char)Fills a string with a given filler until length a_len is reached.- Parameters:
a_s- Stringa_len- inta_char- char- Returns:
- result string
- Since:
- 3.3.3
-
removeChar
public static java.lang.String removeChar(java.lang.String a_s, char a_c)Removes all occurrences of a given char from a string- Parameters:
a_s- the stringa_c- the char to remove- Returns:
- result string
- Since:
- 3.3.3
-
-
DMelt 3.0 © DataMelt by jWork.ORG