Strong is a small Lua library that adds a lot of utilities to Lua's string library, and also adds some operators to strings themselves. It is currently at version 1.0.3.
As you might have guessed, the name "strong" was chosen because it's very close to "string", and because this library makes strings stronger :).
A quick example of a few of the features.
s = "Hello world.\nBoo. This is cool.\nHey!" for line in s:lines() do for _, s in pairs(line / ' ') print(s:capitalize()) end end
The tests are done using telescope. Have a look at the README for that repository to see how to install telescope. Once you've done that, just run
tsc spec.lua. Of course if you want to see the results of every test, you can run
tsc -f spec.lua.
Robin Wellner helped to improve performance of
insertand also added a couple new abilities to that method.
kikito provided a much better implementation of
TsT helped to make
splithave an option to turn on plain text.
- Roland Yonaba provided the solution to a problem with a couple special pattern characters.