# string(ロブロックス ライブラリ) > 文字列を扱うためのライブラリです。文字数を数える・一部を取り出す・大文字にする・検索する、などができます。 - URL:https://roblox.minecraft-okinawa.com/reference/libraries/string/ - 公式:https://create.roblox.com/docs/reference/engine/libraries/string ## 関数 - `string.byte(s: string, i: number, j: number): int`:Returns the internal numerical codes of the characters s[i], s[i+1], ..., s[j]. The default value for i is 1; the default value for j is i. These indices are corrected following the same rules of function string.sub. - `string.char(...: int): string`:Receives zero or more integers and returns a string with length equal to the number of arguments, in which each character has the internal numerical code equal to its corresponding argument. - `string.find(s: string, pattern: string, init: number, plain: bool): number, number`:文字列の中から探して、位置を返します。 - `string.format(formatstring: string, ...: string): string`:書式を指定して文字列を作ります。 - `string.gmatch(s: string, pattern: string): function`:Returns an iterator function that returns the next captures from pattern over the string s each time it's called. - `string.gsub(s: string, pattern: string, replacement: Variant, replacements: number): string, number`:Returns a copy of s in which all or the first n occurrences of the pattern are replaced with the given replacement. The second value returned is the total number of substitutions made. - `string.len(s: string): int`:文字列の長さ(バイト数)を返します。 - `string.lower(s: string): string`:小文字にします。 - `string.match(s: string, pattern: string, init: number): string`:Looks for the first match of pattern in the string s. - `string.pack(format: string, ...: Variant): string`:Returns a binary string containing the provided arguments. - `string.packsize(format: string): number`:Returns the size in bytes of any string packed with a given description. - `string.rep(s: string, n: int): string`:文字列をくりかえします。 - `string.reverse(s: string): string`:Returns a string that is the string s reversed. - `string.split(s: string, separator: string): table`:区切り文字で分けて配列にします。 - `string.sub(s: string, i: int, j: int): string`:文字列の一部を取り出します。 - `string.unpack(format: string, data: string, readStart: string): Tuple`:Extracts the values packed in the provided binary string. - `string.upper(s: string): string`:大文字にします。 英語の説明とメンバー一覧:Roblox Creator Documentation(CC BY 4.0)。日本語の解説はこのサイト独自のものです。 執筆:鈴木孝昌(現役プロジェクトマネージャー/プログラミング講師)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)