Debian Codegraph @

vendor/symfony/string/TruncateMode.php

raw
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <[email protected]>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\String;
13
14 enum TruncateMode
15 {
16 /**
17 * Will cut exactly at given length.
18 *
19 * Length: 14
20 * Source: Lorem ipsum dolor sit amet
21 * Output: Lorem ipsum do
22 */
23 case Char;
24
25 /**
26 * Returns the string up to the last complete word containing the specified length.
27 *
28 * Length: 14
29 * Source: Lorem ipsum dolor sit amet
30 * Output: Lorem ipsum
31 */
32 case WordBefore;
33
34 /**
35 * Returns the string up to the complete word after or at the given length.
36 *
37 * Length: 14
38 * Source: Lorem ipsum dolor sit amet
39 * Output: Lorem ipsum dolor
40 */
41 case WordAfter;
42 }