module Cadmium::Transliterator
Included Modules
- Cadmium::Transliterator::CharMap
Extended Modules
Defined in:
cadmium/transliterator.crcadmium/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
-
#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.
- #replace_str(source, replace)
-
#transliterate(source, **options)
TODO Swap out options for named parameters
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.