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 SummaryConstructors
- 
Method SummaryModifier 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- 
RUStringspublic RUStrings()
 
- 
- 
Method Details- 
isEmptyReturns whether string is null or empty.
- 
startsWithICReturns whether given string starts with given search string, ignoring case.
- 
endsWithICReturns whether given string ends with given search string, ignoring case.
- 
deleteDeletes from the given string any occurrance of the search string.
- 
replaceReplaces in the given string any occurrance of the search string with the replace string.
- 
separateReturns from the given string a list of applicable substrings separated by the separated by the separator string.
- 
separateReturns from the given string a list of applicable substrings separated by the separated by the separator string.
- 
intValueReturns the int result of parsing the given string as if it were a number.
- 
floatValueReturns the float result of parsing the given string as if it were a number.
- 
numberValueUses the NumberFormatter to return the number, whatever the type.
- 
stringWrapWraps aString to an approximate width (quick and dirty line wrapping for use in things like option panes)
- 
toStringReturns the given float value as a string truncated to 3 significant digits.
- 
toStringReturns the given float value as a string truncated to the given number of significant digits.
- 
getBytesReturns the given string as an array of ISO Latin bytes.
- 
getBytesReturns the given string as an array of bytes in the given encoding.
- 
getImageForStringReturns an image for the given string and font.
 
-