2015-01-30 09:40:06 +01:00
|
|
|
# Xdigit
|
|
|
|
|
2017-03-27 14:47:07 +02:00
|
|
|
- `Xdigit()`
|
2018-09-24 21:48:41 +02:00
|
|
|
- `Xdigit(string ...$additionalChars)`
|
2015-01-30 09:40:06 +01:00
|
|
|
|
2019-04-05 20:09:17 +02:00
|
|
|
Validates whether the input is an hexadecimal number or not.
|
2015-01-30 09:40:06 +01:00
|
|
|
|
|
|
|
```php
|
2015-10-20 02:53:25 +02:00
|
|
|
v::xdigit()->validate('abc123'); // true
|
2015-01-30 09:40:06 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
Notice, however, that it doesn't accept strings starting with 0x:
|
|
|
|
|
|
|
|
```php
|
2015-10-20 02:53:25 +02:00
|
|
|
v::xdigit()->validate('0x1f'); // false
|
2015-01-30 09:40:06 +01:00
|
|
|
```
|
|
|
|
|
2019-05-11 18:32:13 +02:00
|
|
|
## Categorization
|
|
|
|
|
|
|
|
- Strings
|
|
|
|
|
2017-03-27 22:04:13 +02:00
|
|
|
## Changelog
|
|
|
|
|
|
|
|
Version | Description
|
|
|
|
--------|-------------
|
|
|
|
0.5.0 | Created
|
|
|
|
|
2015-08-20 06:38:41 +02:00
|
|
|
***
|
2015-01-30 09:40:06 +01:00
|
|
|
See also:
|
|
|
|
|
2017-03-28 11:53:14 +02:00
|
|
|
- [Alnum](Alnum.md)
|
2020-10-05 12:49:14 +02:00
|
|
|
- [Decimal](Decimal.md)
|
2018-12-11 13:31:50 +01:00
|
|
|
- [Digit](Digit.md)
|
2017-03-28 11:53:14 +02:00
|
|
|
- [HexRgbColor](HexRgbColor.md)
|