Scoop API

scoop:scoop.ui:0.1.0

src/text/editor/normalize.scoop

Selected production source · src/text/editor/normalize.scoop

1package scoop.ui.text
3internal fun editorHasLineBreak(text: String): Boolean {
4 for (character in text)
5 if (editorLineBreak(character))
6 return true
7 return false
8}
10internal fun editorLineBreak(character: Char): Boolean =
11 character.code ==
12 10 ||
13 character.code ==
14 13 ||
15 character.code ==
16 11 ||
17 character.code ==
18 12 ||
19 character.code ==
20 133 ||
21 character.code ==
22 8232 ||
23 character.code ==
24 8233