LlChar/ja

From Second Life Wiki
Jump to navigation Jump to search

要約

関数: string llChar( integer val );

指定された Unicode 値から単一の文字列を構築します。
string で返します。

• integer val 文字の Unicode 値。

この関数は、指定された UTF-32 コードポイントの文字から生成された単一の文字列を返します。val が負の場合、"?" (Unicode 0x0F) が返されます。

サンプル

default
{
    touch_start(integer total_number)
    {
        string test_string = "The quick brown fox jumped over the lazy dog";
        list test_list = [];
        string test_string2 = "";
        
        integer index;
        integer ord;
        for (index = 0; index < llStringLength(test_string); ++index)
        {
            ord = llOrd(test_string, index);
            test_list = test_list + [ ord ];
        }
        
        string char;
        for (index = 0; index < llGetListLength(test_list); ++index)
        {
            ord = llList2Integer(test_list, index);
            char = llChar(ord);
            test_string2 = test_string2 + char;
        }
        
        llSay(0, "\"" + test_string + "\" -> [" + 
            llDumpList2String(test_list, ", ") + "] -> \"" + test_string2 + "\"");
    }
}

関連項目

関数

• llOrd/ja 文字を序数に変換します
• llHash/ja 文字列のための32ビットハッシュを計算します

記事

•  "Wikipedia logo"UTF-32

特記事項

Search JIRA for related Issues

Signature

function string llChar( integer val );
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。