misc string helpers
Repository Haxelib Haxe Download
文字列ライブラリ「のりこ」です。
this is string library "noriko".
文字列ユーティリティ
utilities for string.
文字がアルファベットか否かを判定します。
check if charactor is alphabet.
文字がウムラウト有りの文字か否かを判定します。
check if charactor with umlaut.
文字が数字か否かを判定します。
check if charactor is numbers.
文字がひらがなか否かを判定します。
check if charactor is hiragana.
文字がカタカナか否かを判定します。
check if charactor is katakana.
文字が半角カタカナか否かを判定します。
check if charactor is half-katakana.
ひらがなをカタカナに変換します。
convert hiragana to katakana.
カタカナをひらがなに変換します。
convert katakana to hiragana.
ローマ字で表記されている文字列をカタカナに変換します。
convert romaji-string to katakana-string.
カタカナで表記されている文字列をローマ字に変換します。
convert katakana-string to romaji-string.
日本の住所を [ 県, 市区町村, それ以降 ] に分割します。
split japanese address, ex: [ "pref.", "city", "more..." ]
文字列のレーベンシュタイン距離を計算します。
levenshtein algorithm.
Cのstrcmpです
this function is strcmp in C.
#!haxe
trace( JString.strcmp( "maya", "march" ) );
Cのsprintfのように書式変換を行います。
format string like a sprintf in C.
#!haxe
trace( JString.sprintf( "score: %06d", [ 12345 ] ) );
trace( JString.sprintf( "name : %s", [ "きのもと 結衣" ] ) );
trace( JString.sprintf( "%s is %d Yen.", [ "orange", 100 ] ) );
エイホ=コラシック法文字列検索
aho-corasick algorithm.
文字コードユーティリティ
charactor-code utility.
文字列をShift-JISに変換します。
convert String to shift-jis
文字列をShift-JISから内部形式に変換します。
convert String from shift-jis
文字列をJISに変換します。
convert String to jis
文字列をJISから内部形式に変換します。
convert String from jis
文字列をEUCに変換します。
convert String to euc-jp
文字列をEUCから内部形式に変換します。
convert String from euc-jp
文字列をsoundexアルゴリズムで変換します。
文字列をcaverphoneアルゴリズムで変換します。
HTML解析関連。正規表現を使っているので、きちんとしたXMLでなくてもある程度は読めると思います。
scrap a html. it would be able to read unformatted XML.
文字列からエレメントを削除します。
delete tag from string.
pathとvalueの配列を作って返します。属性は@が付いた名前になります。コメントは無視されます。
generate {path, value} array. attributes are added @ to path. ignores comments.
#!haxe
trace( HTML.toPathValue( "<html><a href=\"http://haxe.org/\">haxe rules!</a><b>panther<c>ausf.g</c></b></html>" ) );
/*
[
{ path:"/html/a@href", value:"http://haxe.org/" },
{ path:"/html/a", value:"haxe rules!" },
{ path:"/html/a/b", value:"panther" },
{ path:"/html/a/b/c", value:"ausf.g" },
]
*/
エレメントの中身を取得します。
get inner HTML from element.
#!haxe
trace( HTML.getInnerHTML( "<a href=\"http://haxe.org/\">haxe rules!</a>" ) ); // haxe rules!
文字列からスクリプトを取得します。
get scripts from string.
#!haxe
trace( HTML.getScripts( " aabafa<script language=\"test\">hohoho</script> foo <script language=\"test\">hohoho2</script> baar" ) ); // [ "hohoho", "hohoho2" ]
文字列からスクリプトを削除します
delete scripts from string.
#!haxe
trace( HTML.deleteScripts( "isobe<script language=\"test\">hohoho << >>></script><script language=\"test\">hohoho2</script> noriko" ) ); // isobe noriko
文字列からコメントを削除します
delete comments from string.
#!haxe
trace( HTML.deleteScripts( "abbbb <!-- babab --> tete" ) ); // abbbb tete
コールバック式CSVパーサー
CSV parser using callback method
日付まわりのユーティリティ
date library for japanese
jcode.zipはこちらのデータより作成いたしました。
"jcode.zip" is generate from this data.
ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/JIS0208.TXT
MITライセンス
this library is MIT license.