mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
I described function randomStringUTF8 (#146)
* I described function randomStringUTF8 * Update docs/en/sql-reference/functions/other-functions.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/sql-reference/functions/other-functions.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/sql-reference/functions/other-functions.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Ive edited en-version and translated function description to Russian. Co-authored-by: BayoNet <da-daos@yandex.ru>
This commit is contained in:
parent
ad37660b1a
commit
0d0ce4b760
@ -1200,4 +1200,41 @@ SELECT number, randomPrintableASCII(30) as str, length(str) FROM system.numbers
|
||||
└────────┴────────────────────────────────┴──────────────────────────────────┘
|
||||
```
|
||||
|
||||
## randomStringUTF8 {#randomstringutf8}
|
||||
|
||||
Generates a random string of a specified length. Result string contains valid UTF-8 symbols.
|
||||
|
||||
**Syntax**
|
||||
|
||||
``` sql
|
||||
randomStringUTF8(length);
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `length` — Required length of the resulting string in code points. [UInt64](../../sql-reference/data-types/int-uint.md).
|
||||
|
||||
**Returned value(s)**
|
||||
|
||||
- UTF-8 random string.
|
||||
|
||||
Type: [String](../../sql-reference/data-types/string.md).
|
||||
|
||||
**Example**
|
||||
|
||||
Query:
|
||||
|
||||
```sql
|
||||
SELECT randomStringUTF8(13)
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
```text
|
||||
┌─randomStringUTF8(13)─┐
|
||||
│ 𘤗д兠庇 │
|
||||
└──────────────────────┘
|
||||
|
||||
```
|
||||
|
||||
[Original article](https://clickhouse.tech/docs/en/query_language/functions/other_functions/) <!--hide-->
|
||||
|
@ -1153,4 +1153,41 @@ SELECT number, randomPrintableASCII(30) as str, length(str) FROM system.numbers
|
||||
└────────┴────────────────────────────────┴──────────────────────────────────┘
|
||||
```
|
||||
|
||||
## randomStringUTF8 {#randomstringutf8}
|
||||
|
||||
Генерирует строку определенной длины со случайным набором валидных UTF-8-символов.
|
||||
|
||||
**Синтаксис**
|
||||
|
||||
``` sql
|
||||
randomStringUTF8(length);
|
||||
```
|
||||
|
||||
**Параметры**
|
||||
|
||||
- `length` — Длина итоговой строки. [UInt64](../../sql-reference/data-types/int-uint.md).
|
||||
|
||||
**Возвращаемое значение**
|
||||
|
||||
- Строка со случайными UTF-8-символами.
|
||||
|
||||
Тип: [String](../../sql-reference/data-types/string.md).
|
||||
|
||||
**Пример**
|
||||
|
||||
Запрос:
|
||||
|
||||
```sql
|
||||
SELECT randomStringUTF8(13)
|
||||
```
|
||||
|
||||
Результат:
|
||||
|
||||
```text
|
||||
┌─randomStringUTF8(13)─┐
|
||||
│ 𘤗д兠庇 │
|
||||
└──────────────────────┘
|
||||
|
||||
```
|
||||
|
||||
[Оригинальная статья](https://clickhouse.tech/docs/ru/query_language/functions/other_functions/) <!--hide-->
|
||||
|
Loading…
Reference in New Issue
Block a user