-
-
Notifications
You must be signed in to change notification settings - Fork 277
Expand file tree
/
Copy pathrandom.texy
More file actions
25 lines (16 loc) ยท 709 Bytes
/
random.texy
File metadata and controls
25 lines (16 loc) ยท 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
ใฉใณใใ ๆๅญๅใฎ็ๆ
**********
.[perex]
[api:Nette\Utils\Random] ใฏใๆๅทๅญฆ็ใซๅฎๅ
จใช็ไผผใฉใณใใ ๆๅญๅใ็ๆใใใใใฎ้็ใฏใฉในใงใใ
ใคใณในใใผใซ:
```shell
composer require nette/utils
```
generate(int $length=10, string $charlist=`'0-9a-z'`): string .[method]
-----------------------------------------------------------------------
ใใฉใกใผใฟ `$charlist` ใงๆๅฎใใใๆๅญใใใๆๅฎใใใ้ทใใฎใฉใณใใ ใชๆๅญๅใ็ๆใใพใใ`0-9` ใฎใใใช็ฏๅฒใไฝฟ็จใใใใจใใงใใพใใ
```php
use Nette\Utils\Random;
Random::generate(10); // '6zq3a1nl8n'
Random::generate(5, 'A-Z'); // 'HLKUR'
```