Class StringUtil

java.lang.Object
net.sf.robocode.util.StringUtil

public final class StringUtil extends Object
Class for utilizing strings.
Author:
Flemming N. Larsen (original)
  • Constructor Details

    • StringUtil

      public StringUtil()
  • Method Details

    • toBasicLatin

      public 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.
      Parameters:
      sequence -
      Returns:
    • countChar

      public static int countChar(String str, char chr)
      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.