LlChar/ja

From Second Life Wiki
< LlChar
Revision as of 13:13, 2 November 2023 by Misaki Vanilla (talk | contribs)
Jump to navigation Jump to search

要約

関数: string llChar( integer val );

Construct a single character string from the supplied Unicode value.
string で返します。

• integer val Unicode value for character.

This function returns a single character string generated from the character at the indicated UTF-32 codepoint. Returns "?" (Unicode 0x0F) if val is negative.

サンプル

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 Convert a character into an ordinal
• llHash/ja Calculate a 32bit hash for a string

記事

•  "Wikipedia logo"UTF-32

特記事項

Search JIRA for related Issues

Signature

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