Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Generate url safe slug from a string
Data and general algorithm is taken from https://github.com/simov/slugify
This library assumes all strings are UTF-8. General algorithm:
sep
Example:
let vi = Charmap.mk_charmap [Slug_data.base; Slug_data.vi]
let my_slug = slugify ~charmap: vi "my string"
module Charmap : sig ... end
val slugify :
?sep:string ->
?charmap:Charmap.t ->
?lowercase:bool ->
string ->
string
slugify ?sep ?charmap ?lowercase string
generates slug from string
by replacing whitespaces with sep
and replacement characters from charmap
sep
defaults to "-" charmap
defaults to Charmap.base
lowercase
defaults to true