Update function parameters for MISC::asc() #57
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
変換したデータを書き込むバッファを固定長配列のポインター渡しから可変長配列の参照渡しに変更します。
渡された配列は初期化せずデータを追加(push_back)していきます。
配列のメモリ再確保や再配置を避けるには予め領域を予約(reserve)して渡す必要があります。
関連のissue: #46
テスト
ma8ma:minefieldに変換のテストケースがあります。テストの導入についてはメンテナーの方と #45 で話をしています。
TODO?
平仮名片仮名にUnicode正規化を導入して文字列の比較を強化します。採用する正規化形式はNFKD(互換等価性によって分解)を想定しています。具体的には濁点、半濁点の分解です。
edit: 例を更新
例
片仮名の「ガ」
U+30AC
を分解すると → 「ガ」U+30AB U+3099
半角片仮名の「ガ」
U+FF76 U+FF9E
を分解すると → 「ガ」U+30AB U+3099
分解後の文字列を比較することにより
U+30AC
とU+FF76 U+FF9E
は等しいと評価されます。