A modern, simple, and consistent Common Lisp string manipulation library with a focus on discoverability and composability.
cl-str is a comprehensive string manipulation library for Common Lisp designed to replace and improve upon built-in string functions. It offers a consistent, modern API that prioritizes simplicity, discoverability, and composability, making string operations more intuitive and less error-prone. It fixes common pitfalls in Common Lisp's standard string handling, such as nil handling and argument order inconsistencies.
Common Lisp developers who frequently work with string manipulation and seek a more ergonomic, consistent alternative to built-in functions. It is particularly useful for those building text-processing tools, data transformation pipelines, or applications requiring extensive string operations.
Developers choose cl-str over built-in functions because it provides a cohesive, well-organized library with consistent argument ordering (string last for easy composition), fixes surprising behaviors like nil conversion, and offers enhanced discoverability with a rich set of functions in a single namespace. Its design emphasizes practicality and developer ergonomics.
Modern, simple and consistent Common Lisp string manipulation library.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
All functions place the string argument last, enabling easy composition with pipes and arrows, as highlighted in the library's design philosophy for better ergonomics.
Functions like downcase return nil for nil input, fixing the built-in surprise where nil converts to 'nil', reducing errors in string operations.
Offers a rich range of operations—trimming, joining, splitting, padding, case conversion, and file I/O—in a single namespace, enhancing discoverability over scattered built-ins.
Many functions, such as split and replace-all, accept a :regex keyword argument for flexible pattern matching, leveraging cl-ppcre without requiring separate library calls.
Relies on cl-ppcre for regex support, adding an extra library requirement that may not be ideal for lightweight or dependency-averse projects.
The changelog documents backward incompatible changes, like in v0.14 where split behavior was adjusted, potentially breaking existing code during upgrades.
The match macro is explicitly marked as experimental and may change or break in future releases, posing a risk for production use without careful version pinning.