utf8ライブラリ

ライブラリ日本語解説は準備中

ひとことで言うと

utf8は、ロブロックス(Roblox)のライブラリです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。

公式の説明(英語):This library provides basic support for UTF-8 encoding.

プロパティ(1)

名前と書き方説明
charpattern
utf8.charpattern: string
The pattern "[%z\x01-\x7F\xC2-\xF4][\x80-\xBF]*", which matches exactly zero or more UTF-8 byte sequences, assuming that the subject is a valid UTF-8 string.

関数(8)

名前と書き方説明
char
utf8.char(codepoints: Tuple<int>): string
Converts zero or more codepoints to UTF-8 byte sequences.
codes
utf8.codes(str: string): function, string, int
Returns an iterator function that iterates over all codepoints in a given string.
codepoint
utf8.codepoint(str: string, i: int, j: int): Tuple<int>
Returns the codepoints (as integers) from all codepoints in a given string.
len
utf8.len(s: string, i: int, j: int): int
Returns the number of UTF-8 codepoints in a given string.
offset
utf8.offset(s: string, n: int, i: int): int?
Returns the position (in bytes) where the encoding of the n‑th codepoint of s (counting from byte position i) starts.
graphemes
utf8.graphemes(str: string, i: number, j: number): function
Returns an iterator function that iterates over the grapheme clusters of a given string.
nfcnormalize
utf8.nfcnormalize(str: string): string
Converts the input string to Normal Form C.
nfdnormalize
utf8.nfdnormalize(str: string): string
Converts the input string to Normal Form D.

英語の説明とメンバーの一覧は、Roblox Creator Documentation(utf8)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む