Expand description
Text encoding and decoding utilities
Functionsยง
- escapejs
- Escape quotes in a string for use in JavaScript
- force_
bytes - Convert string to bytes
- force_
str - Safely convert bytes to UTF-8 string, replacing invalid sequences
- linebreaks
- Line breaks to
<br>tags - linebreaksbr
- Line breaks to
<br>tags without wrapping in<p> - slugify
- Convert string to slug (URL-friendly format)
- truncate_
chars - Smart truncate - truncate at word boundary
- truncate_
words - Truncate at word boundary
- urldecode
- URL decode a string
- urlencode
- URL encode a string
- wrap_
text - Wrap text at specified width