Add bilingual manual and localized docs routes
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
# String
|
||||
|
||||
`String` は文字列値を表す primitive type constraint である。
|
||||
|
||||
文字列リテラルは `"` で囲む。
|
||||
|
||||
```dcdl
|
||||
"hello"
|
||||
"line 1\nline 2"
|
||||
```
|
||||
|
||||
文字列内の `$` や `{}` に特別な意味はなく、文字列補間は行わない。
|
||||
|
||||
## 例
|
||||
|
||||
```dcdl
|
||||
name = String;
|
||||
greeting = String default "hello";
|
||||
```
|
||||
|
||||
## 制約合成
|
||||
|
||||
`String` は文字列制約と合成できる。
|
||||
|
||||
```dcdl
|
||||
message = String & /Hello! .*/;
|
||||
```
|
||||
|
||||
正規表現制約の検証は Rust crate の `regex` feature で有効化される。
|
||||
feature が無効な場合、正規表現制約は具体 string に対して検証できず diagnostic になる。
|
||||
Reference in New Issue
Block a user