de.folt.util
Class StringUtil

java.lang.Object
  extended by de.folt.util.StringUtil

public class StringUtil
extends java.lang.Object


Constructor Summary
StringUtil()
           
 
Method Summary
static boolean bCheckValidXMLChars(char c)
          bCheckValidXMLChars http://de.selfhtml.org/xml/regeln/zeichen.htm Erlaubt sind Unicode-Zeichen mit den Hexadezimalwerten #x20 bis #xD7FF, #xE000 bis #xFFFD und #x10000 bis #x10FFFF.
static boolean containsPresentationForm(java.lang.String string)
           
static java.util.Hashtable getTypeWords(java.lang.String text)
           
static int getUntranstedTextLeading(java.lang.String str)
           
static int getUntranstedTextTrailing(java.lang.String str)
           
static java.lang.StringBuffer hex2CharsBuffer(java.lang.String data)
           
static boolean isFormatNumber(java.lang.String str)
           
static boolean isUntranslatedText(java.lang.String str)
           
static java.lang.String removeControlChar(java.lang.String str)
           
static java.lang.String[] removeElements(java.lang.String[] input, java.lang.String toDelete)
          remove a specific string from a string array
static java.lang.String repeatString(java.lang.String str, int times)
          Repeat a string n times
static java.lang.String replaceSubstring(java.lang.String str, java.lang.String old, java.lang.String repl)
          Replaces any occurence of string old in string str with string repl.
static java.lang.String replaceSubstring(java.lang.String str, java.lang.String old, java.lang.String repl, int fromindex)
           
static java.util.Vector<java.lang.String> returnInvalidXMLChars(java.lang.String string)
           
static java.util.Vector<java.lang.Character> returnInvalidXMLCharsAsVector(java.lang.String string)
           
static java.lang.StringBuffer toHexBuffer(java.lang.String str)
          String to a hexadecimal buffer representation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtil

public StringUtil()
Method Detail

bCheckValidXMLChars

public static boolean bCheckValidXMLChars(char c)
bCheckValidXMLChars http://de.selfhtml.org/xml/regeln/zeichen.htm Erlaubt sind Unicode-Zeichen mit den Hexadezimalwerten #x20 bis #xD7FF, #xE000 bis #xFFFD und #x10000 bis #x10FFFF. Nicht erlaubt sind lediglich die beiden Zeichen mit den Hexadezimalwerten #xFFFE und #xFFFF, da diese beiden keine Unicode-Zeichen darstellen. Ferner sind folgende Steuerzeichen erlaubt: Tabulator-Zeichen (hexadezimal #x9), Zeilenvorschub-Zeichen (#xA) und Wagenrücklaufzeichen (#xD). Diese drei Zeichen plus das normale Leerzeichen (#x20) bilden die so genannten Leerraumzeichen.

Parameters:
c -
Returns:

containsPresentationForm

public static boolean containsPresentationForm(java.lang.String string)

getTypeWords

public static java.util.Hashtable getTypeWords(java.lang.String text)

getUntranstedTextLeading

public static int getUntranstedTextLeading(java.lang.String str)

getUntranstedTextTrailing

public static int getUntranstedTextTrailing(java.lang.String str)

hex2CharsBuffer

public static java.lang.StringBuffer hex2CharsBuffer(java.lang.String data)

isFormatNumber

public static boolean isFormatNumber(java.lang.String str)

isUntranslatedText

public static boolean isUntranslatedText(java.lang.String str)

removeControlChar

public static java.lang.String removeControlChar(java.lang.String str)

removeElements

public static java.lang.String[] removeElements(java.lang.String[] input,
                                                java.lang.String toDelete)
remove a specific string from a string array

Parameters:
input - the input string
toDelete - the string to remove from Array
Returns:
the cleaned array

repeatString

public static java.lang.String repeatString(java.lang.String str,
                                            int times)
Repeat a string n times

Parameters:
str - the string to repeat
times - how often
Returns:
repeated string

replaceSubstring

public static java.lang.String replaceSubstring(java.lang.String str,
                                                java.lang.String old,
                                                java.lang.String repl)
Replaces any occurence of string old in string str with string repl.

Parameters:
str - the original string
old - the substring to be replaced
repl - the replacement string for old

replaceSubstring

public static java.lang.String replaceSubstring(java.lang.String str,
                                                java.lang.String old,
                                                java.lang.String repl,
                                                int fromindex)

returnInvalidXMLChars

public static java.util.Vector<java.lang.String> returnInvalidXMLChars(java.lang.String string)

returnInvalidXMLCharsAsVector

public static java.util.Vector<java.lang.Character> returnInvalidXMLCharsAsVector(java.lang.String string)

toHexBuffer

public static java.lang.StringBuffer toHexBuffer(java.lang.String str)
String to a hexadecimal buffer representation

Parameters:
str -
Returns: