25 calls to Unicode::truncate() BookManager::recurseTableOfContents in core/ modules/ book/ src/ BookManager.php Recursively processes and formats book links for getTableOfContents(). That "See" alone is too short, and would then just truncate ignoring wordīoundaries, giving you "See MyVeryLongURL." (assuming you had set You had set $min_wordsafe_length to 10, though, the function would realise Is after the word "See", which wouldn't leave a very informative string. Return length of 20, the only available word boundary within 20 characters String "See for more information" to a word-safe ![]() This can be used to prevent having a very short resulting string ![]() If $wordsafe is TRUE, the minimum acceptable length for truncation (beforeĪdding an ellipsis, if $add_ellipsis is TRUE). The string length will still fall within $max_length. If TRUE, add '.' to the end of the truncated string (defaults toįALSE). $max_length and $min_wordsafe_length), word boundaries are ignored. Of the returned string fall within length guidelines (see parameters If a word boundary cannot be found that would make the length Non-Latin languages see Unicode::PREG_CLASS_WORD_BOUNDARY for more Spaces, punctuation, and Unicode characters used as word boundaries in If TRUE, attempt to truncate on a word boundary. ![]() ParametersĪn upper limit on the returned string length, including trailing ellipsis Truncates a UTF-8-encoded string safely to a number of characters.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |