打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
strong A Lua library that makes your strings stronger!
README.md

Description

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.

Strong is based largely on Ruby's String class. I've also taken a few things from thelinx's extensions to strings.

The Name

As you might have guessed, the name "strong" was chosen because it's very close to "string", and because this library makes strings stronger :).

Features/Documentation

To get an idea of, or documentation for, strong's features, take a look at the wiki. Over there you can find the function reference, and documentation for string indexing and the operators.

Example

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())  endend

Tests

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.

Contributors

  • Robin Wellner helped to improve performance of insert and also added a couple new abilities to that method.
  • kikito provided a much better implementation of squeeze.
  • TsT helped to make split have an option to turn on plain text.
  • Roland Yonaba provided the solution to a problem with a couple special pattern characters.
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Stronger (What Doesn't Kill You)-Kelly
【每日一句】Pain makes you stronger. Tears make you brav...
[语法] A is no better than B,为什么是“A 和 B 一样差”?
英语听力:痛苦让你强大,Pain makes you stronger
what is the sfl
尼采的18句名言,一生至少读一遍
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服