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 StringDeletes from the given string any occurrance of the search string.static booleanendsWithIC(String aString, String endString) Returns whether given string ends with given search string, ignoring case.static floatfloatValue(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 ImagegetImageForString(String aString, Font aFont) Returns an image for the given string and font.static intReturns the int result of parsing the given string as if it were a number.static booleanReturns whether string is null or empty.static NumbernumberValue(String aString) Uses the NumberFormatter to return the number, whatever the type.static StringReplaces in the given string any occurrance of the search string with the replace string.static ListReturns from the given string a list of applicable substrings separated by the separated by the separator string.static ListReturns from the given string a list of applicable substrings separated by the separated by the separator string.static booleanstartsWithIC(String aString, String startString) Returns whether given string starts with given search string, ignoring case.static StringstringWrap(String aString, int approximateWidth) Wraps aString to an approximate width (quick and dirty line wrapping for use in things like option panes)static StringtoString(float aValue) Returns the given float value as a string truncated to 3 significant digits.static StringtoString(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.
-