Files
Decodal/doc/manual/source/jp/language/value/string.md
T

645 B

String

String は文字列値を表す primitive type constraint である。

文字列リテラルは " で囲む。

"hello"
"line 1\nline 2"

文字列内の ${} に特別な意味はなく、文字列補間は行わない。

name = String;
greeting = String default "hello";

制約合成

String は文字列制約と合成できる。

message = String & /Hello! .*/;

正規表現制約の検証は Rust crate の regex feature で有効化される。 feature が無効な場合、正規表現制約は具体 string に対して検証できず diagnostic になる。