- Scilabヘルプ
 - Strings
 - ascii
 - asciimat
 - blanks
 - char
 - convstr
 - emptystr
 - eval
 - evstr
 - grep
 - isalphanum
 - isascii
 - isdigit
 - isletter
 - isnum
 - justify
 - length
 - part
 - prettyprint
 - regexp
 - sci2exp
 - strcat
 - strchr
 - strcmp
 - strcmpi
 - strcspn
 - strindex
 - string
 - strings
 - stripblanks
 - strncpy
 - strrchr
 - strrev
 - strsplit
 - strspn
 - strstr
 - strsubst
 - strtod
 - strtok
 - tokenpos
 - tokens
 
Please note that the recommended version of Scilab is 2026.0.0. This page might be outdated.
See the recommended documentation of this function
string
文字列に変換
呼び出し手順
string(x) [out, in, text] = string(x)
引数
- x
 論理値, 複素数, 実数, 整数, 多項式行列, 暗黙の大きさ, ライブラリまたは関数.
説明
string関数は
            行列x を文字列の行列に変換します.
xが関数の場合,
            [out, in, text] = string(x) は
            3つの文字列ベクトルを返します:
            out は出力変数のベクトル,
            in は入力変数のベクトル, そして text は
            関数のソースコードの(列)ベクトルです.
xが lib変数の場合,
            textは文字列の列ベクトルとなります.
            最初の要素は,ライブラリファイルのパス,
            その他の要素は定義する関数の名前を有します.
文字列は'string' (引用符で括る)または
            "string" (二重引用符で括る)で定義されます;
            文字列の行列は通常の定数行列として定義されます.
文字列の結合は+操作により行われます.
複素数, 実数, 整数, 多項式行列の場合,
            string の出力は
            format function (例参照)で管理されます.
string([]) は []を返すことに注意してください.
例
string(rand(2, 2)) deff("y = mymacro(x)", "y = x + 1") [out, in, text] = string(mymacro) x = 123.356; disp("Result is " + string(x)); disp("/" + string(~%t) + "/"); disp("/" + string(%i+1) + "/"); disp("/" + string(int16(-123)) + "/"); disp("/" + string(1 + %s + %s^3) + "/"); string(corelib) v = format(); disp(string(%pi)) format(24); disp(string(%pi)) format(v(2)) string(1:4:$)
参照
履歴
| Version | Description | 
| 5.4.0 | 暗黙の大きさの型が入力引数として管理されます. | 
| Report an issue | ||
| << strindex | Strings | strings >> |