如何转换 é -> e, š -> s, ė -> e , ± -> a ... 在 javascript 中?
How convert é -> e, š -> s, ė -> e , ą -> a ... in javascript?
我有一个像 Brazil: Série A
这样的字符串,我的目标是转换为 Brazil: Serie A
。
此外,方法应该转换和其他类似情况:
é -> e, š -> s, ė -> e , ± -> a ...
我正在使用 Slugify(https://github.com/simov/slugify) to do just that. It comes with a predefined set of characters it will replace with plain english ones https://github.com/simov/slugify/blob/master/index.js#L13 以及扩展它的能力。
我有一个像 Brazil: Série A
这样的字符串,我的目标是转换为 Brazil: Serie A
。
此外,方法应该转换和其他类似情况: é -> e, š -> s, ė -> e , ± -> a ...
我正在使用 Slugify(https://github.com/simov/slugify) to do just that. It comes with a predefined set of characters it will replace with plain english ones https://github.com/simov/slugify/blob/master/index.js#L13 以及扩展它的能力。