String utils in support of legal publishing
  • Ruby 98.6%
  • Shell 1.4%
Find a file
Robb Shecter 2390b86571
Add with and other small words (#7)
* failing test

* test passes

* refactor

* add USA initialism

* more small words
2023-07-05 09:36:41 -06:00
.github/workflows Fixing CI (#6) 2022-02-12 04:17:19 -07:00
bin chore: initial check in 2018-04-03 20:55:47 -07:00
lib Add with and other small words (#7) 2023-07-05 09:36:41 -06:00
spec Add with and other small words (#7) 2023-07-05 09:36:41 -06:00
.gitignore 99 coverage (#1) 2018-09-22 14:13:02 -07:00
.rspec 99 coverage (#1) 2018-09-22 14:13:02 -07:00
Gemfile chore: initial check in 2018-04-03 20:55:47 -07:00
Gemfile.lock Add with and other small words (#7) 2023-07-05 09:36:41 -06:00
law_string.gemspec Add with and other small words (#7) 2023-07-05 09:36:41 -06:00
LICENSE.txt chore: initial check in 2018-04-03 20:55:47 -07:00
Rakefile chore: initial check in 2018-04-03 20:55:47 -07:00
README.md Update README.md 2022-02-11 20:32:42 -07:00

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_typograpy e.g., changing ASCII quotes to true UTF-8 double quotes.
  • #add_html_typograhy improvements which require HTML.
  • #initialism? to detect, e.g., "ATM". Very rudimentary.
  • #initials? to detect, e.g., "A.S.C.A.P."
  • #titleize enhanced for English-language legal texts, coded to reduce memory allocations.

See the tests for details.