Skip to content

Chew/simple-delimiter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

simple-delimiter

This is a simple reload of a 10 year old gem dubbed "Commatose". I've simply fixed it up to more modern standards.

Here's how it works. By default, it delimits every 3 with a ","

123456.to_sc
# => "123,456"

123456.789.to_sc
# => "123,456.789"

It also supports custom delimiters

123456.to_sc("_")
# => "123_456"

123456.789.to_sc("_")
# => "123_456.789"

As well as how often it delimits

123456.to_sc(";", 2)
# => "12;34;56"

123456.789.to_sc(";", 2)
# => "12;34;56.789"

About

i sure love commas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages