iz
Clone
https://git.tahinli.com/Tahinli/iz.git
0 watching0 forksRustAGPL-3.0567.3 KiB3950aceTahinli27 days ago34 commits
| 1 | //! Cleaning of the text people type: titles, names and comments. Control characters are dropped, so a NUL |
| 2 | //! or a CR/LF never reaches a page, a mail subject or a header. Bidi controls and invisible formatting |
| 3 | //! characters are dropped too, because they change how text is shown: U+202E makes `invoice\u{202E}fdp.exe` |
| 4 | //! read as `invoice exe.pdf`. |
| 5 | |
| 6 | /// Whether `c` is an invisible formatting character or a bidi control. The set is the one of `in`'s |
| 7 | /// display-name rules (`in-core` `names.rs`); copied, not shared. U+200D stays: emoji sequences need it, |
| 8 | /// and it cannot reorder text. |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | /// One line of text: every control character, bidi control and invisible formatting character removed, |
| 24 | /// then trimmed. |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | /// Several lines of text: like [`single_line`], but line feeds and tabs stay. A CR is dropped, so CRLF |
| 34 | /// line ends become LF. |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 |