scoop:scoop.ui:0.1.0
src/text/editor/normalize.scoop
Selected production source · src/text/editor/normalize.scoop
1
package scoop.ui.text3
internal fun editorHasLineBreak(text: String): Boolean {4
for (character in text)5
if (editorLineBreak(character))6
return true7
return false8
}10
internal 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