Skip to content

Rails plugin extending String, mostly notably for unicode-to-ascii conversion

Notifications You must be signed in to change notification settings

tomash/ascii_tic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

AsciiTic

A Rails plugin for extending String with “simplyfying” (thus ascetic) operations.

About

Check out lib/ascii_tic.rb for module that’s used to extend String class on load. Current methods:

  • strip_html – self-explanatory

  • to_ascii_brutal – convert diactric unicode charaters to their ascii equivalents, most useful for creating permalinks

  • to_permalink – convert all non-alphanumeric characters to dashes

Example

>> "zażółć gęślą jaźń".to_ascii_brutal
=> "zazolc gesla jazn"
>> "zażółć gęślą jaźń".to_ascii_brutal.to_permalink
=> "zazolc-gesla-jazn"

Copyright © 2009 Tomek “Tomash” Stachewicz (find me on tomash.wrug.eu), released under the MIT license

About

Rails plugin extending String, mostly notably for unicode-to-ascii conversion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages