mirror of
https://github.com/public-law/law_string.git
synced 2026-07-09 20:28:40 -07:00
String utils in support of legal publishing
- Ruby 98.6%
- Shell 1.4%
|
|
||
|---|---|---|
| .github/workflows | ||
| bin | ||
| lib | ||
| spec | ||
| .gitignore | ||
| .rspec | ||
| Gemfile | ||
| Gemfile.lock | ||
| law_string.gemspec | ||
| LICENSE.txt | ||
| Rakefile | ||
| README.md | ||
LawString
A few string util functions which support the Public.Law apps. Optimized for reduced object instantiation at the expense of readability.
Installation
Add this line to your application's Gemfile:
gem 'law_string'
And then execute:
$ bundle
Or install it yourself as:
$ gem install law_string
Usage
Provides;
#add_typograpye.g., changing ASCII quotes to true UTF-8 double quotes.#add_html_typograhyimprovements which require HTML.#initialism?to detect, e.g., "ATM". Very rudimentary.#initials?to detect, e.g., "A.S.C.A.P."#titleizeenhanced for English-language legal texts, coded to reduce memory allocations.
See the tests for details.