Package com.ribs
Class RUStrings
java.lang.Object
com.ribs.RUStrings
This class offers a number of useful String utilities used by ribs classes.
Copyright (c) 2004 ReportMill Software, Inc. All Rights Reserved. Contact ReportMill <info@reportmill.com>.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Deletes from the given string any occurrance of the search string.static boolean
endsWithIC
(String aString, String endString) Returns whether given string ends with given search string, ignoring case.static float
floatValue
(String aString) Returns the float result of parsing the given string as if it were a number.static byte[]
Returns the given string as an array of ISO Latin bytes.static byte[]
Returns the given string as an array of bytes in the given encoding.static Image
getImageForString
(String aString, Font aFont) Returns an image for the given string and font.static int
Returns the int result of parsing the given string as if it were a number.static boolean
Returns whether string is null or empty.static Number
numberValue
(String aString) Uses the NumberFormatter to return the number, whatever the type.static String
Replaces in the given string any occurrance of the search string with the replace string.static List
Returns from the given string a list of applicable substrings separated by the separated by the separator string.static List
Returns from the given string a list of applicable substrings separated by the separated by the separator string.static boolean
startsWithIC
(String aString, String startString) Returns whether given string starts with given search string, ignoring case.static String
stringWrap
(String aString, int approximateWidth) Wraps aString to an approximate width (quick and dirty line wrapping for use in things like option panes)static String
toString
(float aValue) Returns the given float value as a string truncated to 3 significant digits.static String
toString
(float aValue, int significantDigits) Returns the given float value as a string truncated to the given number of significant digits.
-
Constructor Details
-
RUStrings
public RUStrings()
-
-
Method Details
-
isEmpty
Returns whether string is null or empty. -
startsWithIC
Returns whether given string starts with given search string, ignoring case. -
endsWithIC
Returns whether given string ends with given search string, ignoring case. -
delete
Deletes from the given string any occurrance of the search string. -
replace
Replaces in the given string any occurrance of the search string with the replace string. -
separate
Returns from the given string a list of applicable substrings separated by the separated by the separator string. -
separate
Returns from the given string a list of applicable substrings separated by the separated by the separator string. -
intValue
Returns the int result of parsing the given string as if it were a number. -
floatValue
Returns the float result of parsing the given string as if it were a number. -
numberValue
Uses the NumberFormatter to return the number, whatever the type. -
stringWrap
Wraps aString to an approximate width (quick and dirty line wrapping for use in things like option panes) -
toString
Returns the given float value as a string truncated to 3 significant digits. -
toString
Returns the given float value as a string truncated to the given number of significant digits. -
getBytes
Returns the given string as an array of ISO Latin bytes. -
getBytes
Returns the given string as an array of bytes in the given encoding. -
getImageForString
Returns an image for the given string and font.
-