mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[ion/unicode] Define and use CodePoint const methods
isLowerCaseLetter isUpperCaseLetter isLetter isDigit Remove similar ones from UTF8Helper and from Poincare::Tokenizer.
This commit is contained in:
committed by
Léa Saviot
parent
7665ad6fe0
commit
9b0b4e3096
@@ -414,7 +414,7 @@ bool PythonToolbox::handleEvent(Ion::Events::Event event) {
|
||||
}
|
||||
if (event.hasText() && strlen(event.text()) == 1 ) {
|
||||
char c = event.text()[0];
|
||||
if (UTF8Helper::CodePointIsLetter(c)) {
|
||||
if (CodePoint(c).isLetter()) {
|
||||
scrollToLetter(c);
|
||||
return true;
|
||||
}
|
||||
@@ -475,7 +475,7 @@ int PythonToolbox::maxNumberOfDisplayedRows() {
|
||||
}
|
||||
|
||||
void PythonToolbox::scrollToLetter(char letter) {
|
||||
assert(UTF8Helper::CodePointIsLetter(letter));
|
||||
assert(CodePoint(letter).isLetter());
|
||||
/* We look for a child MessageTree that starts with the wanted letter. If we
|
||||
* do not find one, we scroll to the first child MessageTree that starts with
|
||||
* a letter higher than the wanted letter. */
|
||||
@@ -487,7 +487,7 @@ void PythonToolbox::scrollToLetter(char letter) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
if (index < 0 && l >= lowerLetter && UTF8Helper::CodePointIsLowerCaseLetter(l)) {
|
||||
if (index < 0 && l >= lowerLetter && CodePoint(l).isLowerCaseLetter()) {
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user