Here are some extensions to the String class used
by Locana. This includes and extends the AddLocanaSupport module so Symbols can be
used as the :text or :value attribute of Locana
objects based on the Lobject class.
Included modules
This is the reverse of succ!.
Returns a new string based self with line feeds inserted at distance
intervals without splitting any words.
- distance - the number of characters to wrap each line.
- allow_growth - if nil then, the line is wrapped at distance. If > 0
then, individual lines can extend this amount beyond distance if it is a
better fit.
- min_distance - this keeps a line from getting too short. It is ignored if
allow_growth = nil. If the last line is shorter than min_distance, then the
string will be rewrapped using distance+1. The default is nil which will
not rewrap the line.
Returns a new string based self with line feeds inserted at distance
intervals without splitting any words such that the pixel width of each
line is less than pixel_width.
- pixel_width - the number of
pixels to wrap each line at.
Returns true if this string has been word wrapped. Used by the Leditbox box to efficiently rewrap lines as
needed.
An indicator is added to the String to indicate
it has been wrapped. This Sets the word wrapped flag to new_value for this
string. Used by the Leditbox box to efficiently
rewrap lines as needed.
Thank you for taking the time to visit this web page. I trust you found the information contained in this page useful.
Please email any questions, concerns, or issues with this web site to webmaster@sevasoftware.com.
Please remember Seva Software when your company would benefit from an experienced database architect and software engineer.