| @@ 1415-1425 (lines=11) @@ | ||
| 1412 | * @return static |
|
| 1413 | * <p>Object with the resulting $str after being html decoded.</p> |
|
| 1414 | */ |
|
| 1415 | public function htmlDecode(int $flags = \ENT_COMPAT): self |
|
| 1416 | { |
|
| 1417 | return static::create( |
|
| 1418 | $this->utf8::html_entity_decode( |
|
| 1419 | $this->str, |
|
| 1420 | $flags, |
|
| 1421 | $this->encoding |
|
| 1422 | ), |
|
| 1423 | $this->encoding |
|
| 1424 | ); |
|
| 1425 | } |
|
| 1426 | ||
| 1427 | /** |
|
| 1428 | * Convert all applicable characters to HTML entities. |
|
| @@ 1483-1493 (lines=11) @@ | ||
| 1480 | * @return static |
|
| 1481 | * <p>Object with the resulting $str after being html encoded.</p> |
|
| 1482 | */ |
|
| 1483 | public function htmlEncode(int $flags = \ENT_COMPAT): self |
|
| 1484 | { |
|
| 1485 | return static::create( |
|
| 1486 | $this->utf8::htmlentities( |
|
| 1487 | $this->str, |
|
| 1488 | $flags, |
|
| 1489 | $this->encoding |
|
| 1490 | ), |
|
| 1491 | $this->encoding |
|
| 1492 | ); |
|
| 1493 | } |
|
| 1494 | ||
| 1495 | /** |
|
| 1496 | * Capitalizes the first word of the string, replaces underscores with |
|