How to Convert Special Chars to Standard Chars?

前端 未结 3 1301
天涯浪人
天涯浪人 2021-01-19 10:13

I\'m looking for way to convert chars like āžšķūņrūķīš to azskunrukis. In other words, to replace ā with a, ž with z an

3条回答
  •  星月不相逢
    2021-01-19 10:51

    I'm not sure of any functions that do this directly, but there are some implementations of translation tables that do something like that in the comments on strtr's documentation page. They end up using a table that directly translates each character to its equivalent, i.e. "ž" => "z".

提交回复
热议问题