module Cadmium::Transliterator

Included Modules

Extended Modules

Defined in:

cadmium/transliterator.cr
cadmium/transliterator/char_map.cr

Constant Summary

DEFAULT_OPTS = {unknown: "[?]", replace: {} of String | Regex => String, replace_after: {} of String | Regex => String, ignore: [] of String | Char, trim: true}

Instance Method Summary

Instance Method Detail

def parameterize(string : String, separator : String = "-", preserve_case : Bool = false, convert_underscores : Bool = false) #

Replaces special characters in a string so that it may be used as part of a ‘pretty’ URL. Based on the ActiveSupport implementation.


[View source]
def replace_str(source, replace) #

[View source]
def transliterate(source, **options) #

TODO Swap out options for named parameters


[View source]