mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-09 16:17:44 +00:00
work on a bunch of todos
This commit is contained in:
parent
f06193f1f0
commit
38fd364178
265 changed files with 1002 additions and 1696 deletions
|
@ -14,6 +14,7 @@ import helium314.keyboard.latin.PunctuationSuggestions;
|
|||
import helium314.keyboard.latin.R;
|
||||
import helium314.keyboard.latin.common.Constants;
|
||||
import helium314.keyboard.latin.common.StringUtils;
|
||||
import helium314.keyboard.latin.common.StringUtilsKt;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
@ -74,10 +75,13 @@ public final class SpacingAndPunctuations {
|
|||
}
|
||||
|
||||
public boolean containsSometimesWordConnector(final CharSequence word) {
|
||||
// todo: this only works if all mSortedSometimesWordConnectors are simple chars
|
||||
for (int i = 0; i < word.length(); i++) {
|
||||
if (isSometimesWordConnector(word.charAt(i)))
|
||||
return true;
|
||||
final String s = (word instanceof String) ? (String) word : word.toString();
|
||||
final int length = s.length();
|
||||
int offset = 0;
|
||||
while (offset < length) {
|
||||
int cp = s.codePointAt(offset);
|
||||
if (isSometimesWordConnector(cp)) return true;
|
||||
offset += Character.charCount(cp);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue