Package net.sf.robocode.util
Class StringUtil
java.lang.Object
net.sf.robocode.util.StringUtil
Class for utilizing strings.
- Author:
- Flemming N. Larsen (original)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
Returns the number of occurrences of a specific character.static String
toBasicLatin
(CharSequence sequence) Returns a string encoded into Basic Latin, where characters that cannot be represented in Basic Latin are represented as encoded unicode characters.
-
Constructor Details
-
StringUtil
public StringUtil()
-
-
Method Details
-
toBasicLatin
Returns a string encoded into Basic Latin, where characters that cannot be represented in Basic Latin are represented as encoded unicode characters.- Parameters:
sequence
-- Returns:
-
countChar
Returns the number of occurrences of a specific character.- Parameters:
str
- is the string containing the character to look for.chr
- is the character we look for.- Returns:
- the number of occurrences.
-