Package net.sf.robocode.util

# 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 Summary

Constructors
Constructor
Description
`StringUtil()`

## Method Summary

Modifier and Type
Method
Description
`static int`
`countChar(String str, char chr)`
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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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.