Commit Graph

7 Commits (cd7fe8a213b20ac8a05ce631fadd078a16f90a1d)

Author SHA1 Message Date
myk002 af47434f52
protect against 0 width in string:wrap() 2022-04-29 11:29:19 -07:00
Myk 96b5b4420b
Add string:escape_pattern() utility function (#2082)
* add string:escape_pattern() to dfhack.lua

stolen from devel/query.lua. will migrate scripts to use the common implementation later
2022-04-10 21:18:01 -07:00
lethosor f9627a0cfb
Add another split() test for pattern delimiters 2021-07-03 00:33:28 -04:00
lethosor da3b522061
Enable string.split() tests
Ref #1888 (step 4)
2021-07-03 00:31:19 -04:00
myk002 36b2d05ff6
add dfhack string functions and tests
added string:split
added string:trim
added a default value for wrap width
added function comments
added tests for all string functions (the tests for string:split will be commented out until we remove the competing implementation in gui/load-screen
2021-07-02 13:21:54 -07:00
lethosor 0297a5b1b8
Check some more cases, especially empty strings 2021-06-24 00:42:50 -04:00
myk002 5b12c64cba
add new string function: wrap()
refactored and improved from the implementation in quickfort's dialog.lua
2021-06-23 13:59:39 -07:00