-
Notifications
You must be signed in to change notification settings - Fork 88
string split width break
string-split-width-break returns a modified version of string str which is wrapped to fit into a window of width w using the fontsize obtained from font fnt. Unlike string-split-width wrapping can occur between any two characters (words can be broken up), spaces and new lines in the text are not treated differently than other characters. This procedure is used by string-split-width when dealing with sections of text that are two long to fit on one line but do not contain any spaces (single words).
What is returned is a list, where each string in the list is one of the lines. This procedure assumes that at least one split is necessary, thus the list is at least length 2. Each string in the list is at least string-length 1.
Parameter | Description |
---|---|
str | The string to be split |
w | The maximal width before a split has to occur |
fnt | The font used to render the string |
Example 1: Wrap an 16pt string to fit onto a 100px wide window
> (string-split-width-break "abcdefghijklmnopqrstuvwxyz" 100 ascii_16.fnt)
("abcdefghijklm" "nopqrstuvwxy" "z")
-
- accelerometer
- alist
- audio
- audioaux
- base64
- btle-scan
- camera
- cdb
- cgi
- config
- csv
- curl
- digest
- dmtx
- download
- eventloop
- fcgi
- fft
- generalized-arrays
- gps
- graph
- gyro
- hidapi
- hpdf
- html
- httpsclient
- hybridapp
- json
- lmdb
- ln_core
- ln_glcore
- ln_glgui
- ln_store
- localization
- localization_gui
- localnotification
- magnetometer
- mdns
- mqtt
- mqtt-store
- multitouch
- oauth
- orientation
- p256ecdsa
- png
- portaudio
- pregexp
- pressure
- prime
- pushnotification
- redcap
- rsa
- rtaudio
- rupi
- rotation
- sanestring
- scheduler
- serial
- sets
- settings
- simplexnoise
- sqlite
- ssax
- syntax-case
- timestamp
- ttf
- uiform
- url
- uuid
- vibrate
- videoplayer
- watchdog
- website
- xml
- zip