1 unstable release
| 0.1.0 | Jun 22, 2025 |
|---|
#1833 in Data structures
44KB
934 lines
mumustring
mumu-string is a powerful string utilities plugin for the Lava language. It provides a rich set of string manipulation functions—ranging from basic case conversion to concatenation, slicing, replacement, partial application, and more.
🚀 Features
- Unary helpers:
lower,upper,trim,length,to_string. - Multi-argument utilities:
concat,split,join,replace,contains,starts_with,ends_with,slice,repeat,index_of,last_index_of. - Placeholder & partial application support: Supports
_for currying functions.
Example usage in the REPL:
string:concat("Hello", "World") ; "HelloWorld"
string:replace("foo bar foo", "foo", "baz") ; "baz bar baz"
string:trim(" spaces ") ; "spaces"
string:slice("abcdef", 2, 5) ; "cde"
🛠️ Installation
Add mumustring to your Cargo.toml:
[dependencies]
mumustring = "0.1.0"
As a Lava plugin
Compile and install the shared library:
git clone https://gitlab.com/your-org/mum-ustring.git
cd mumustring
make
make install
This places libmumustring.so (and symlink libstring.so) into /usr/local/lib/. Then in the Lava REPL:
extend("string")
string:upper("hello") ; "HELLO"
📦 License
Dual-licensed under MIT and Apache‑2.0. Choose whichever suits your needs. See LICENSE for full terms.
🤝 Contributing
Contributions welcome! Please open issues or merge requests on GitLab. Refer to the code style and tests for adding new features.
📞 Support
For help or questions, open an issue on the GitLab repository.
Dependencies
~8–20MB
~217K SLoC