![]() |
TilePlus Version 5
Unity3D Tilemap Extension
|
String utilities. More...
Static Public Member Functions | |
| static List< string > | WordWrap (this string text, int maxCharactersPerLine, bool breakWords=false, char? hyphenChar='-', int hyphenatedWordMinLength=1) |
| Takes in a string and splits it into multiple lines (array indices) of a specified length. If a word is too long to fit on a line, the word gets moved to the next line (the next array index) | |
String utilities.
|
static |
Takes in a string and splits it into multiple lines (array indices) of a specified length. If a word is too long to fit on a line, the word gets moved to the next line (the next array index)
| text | The text to word wrap |
| maxCharactersPerLine | The maximum characters per line |
| breakWords | Determine if words should fit as many as possible on current line, with remaining broken up to the next line |
| hyphenChar | The character to use at the end of the line as a hyphen when breaking up words |
| hyphenatedWordMinLength | The minimum length of the hyphenated word after it is broken up. A word will not be hyphenated unless it meets this minimum length after it is broken up |
The returned list is re-used (cleared) and modified every time this method is used.