Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
b76ce125
Commit
b76ce125
authored
11 years ago
by
Jean Chalard
Committed by
Android (Google) Code Review
11 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Remove a useless function"
parents
a5a2f3e3
bc501647
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
java/src/com/android/inputmethod/latin/StringUtils.java
+0
-11
0 additions, 11 deletions
java/src/com/android/inputmethod/latin/StringUtils.java
tests/src/com/android/inputmethod/latin/StringUtilsTests.java
+0
-18
0 additions, 18 deletions
...s/src/com/android/inputmethod/latin/StringUtilsTests.java
with
0 additions
and
29 deletions
java/src/com/android/inputmethod/latin/StringUtils.java
+
0
−
11
View file @
b76ce125
...
@@ -282,15 +282,4 @@ public final class StringUtils {
...
@@ -282,15 +282,4 @@ public final class StringUtils {
}
}
return
builder
.
toString
();
return
builder
.
toString
();
}
}
public
static
boolean
containsAny
(
final
String
string
,
final
String
separators
)
{
final
int
len
=
separators
.
length
();
for
(
int
i
=
0
;
i
<
len
;
i
=
separators
.
offsetByCodePoints
(
i
,
1
))
{
final
int
separator
=
separators
.
codePointAt
(
i
);
if
(-
1
!=
string
.
indexOf
(
separator
))
{
return
true
;
}
}
return
false
;
}
}
}
This diff is collapsed.
Click to expand it.
tests/src/com/android/inputmethod/latin/StringUtilsTests.java
+
0
−
18
View file @
b76ce125
...
@@ -215,22 +215,4 @@ public class StringUtilsTests extends AndroidTestCase {
...
@@ -215,22 +215,4 @@ public class StringUtilsTests extends AndroidTestCase {
checkCapitalize
(
"Lorem!Ipsum (dolor) Sit * Amet"
,
"Lorem!Ipsum (Dolor) Sit * Amet"
,
checkCapitalize
(
"Lorem!Ipsum (dolor) Sit * Amet"
,
"Lorem!Ipsum (Dolor) Sit * Amet"
,
" \n,.;!?*()&"
,
Locale
.
ENGLISH
);
" \n,.;!?*()&"
,
Locale
.
ENGLISH
);
}
}
public
void
testContainsAny
()
{
assertFalse
(
StringUtils
.
containsAny
(
""
,
" "
));
assertFalse
(
StringUtils
.
containsAny
(
"test and retest"
,
""
));
assertTrue
(
StringUtils
.
containsAny
(
"test and retest"
,
"x3iq o"
));
assertTrue
(
StringUtils
.
containsAny
(
"test and retest"
,
"x3iqo "
));
assertTrue
(
StringUtils
.
containsAny
(
"test and retest"
,
" x3iqo"
));
assertFalse
(
StringUtils
.
containsAny
(
"test and retest"
,
"x3iqo"
));
assertTrue
(
StringUtils
.
containsAny
(
"test and retest"
,
"tse "
));
assertTrue
(
StringUtils
.
containsAny
(
"test and retest."
,
".?()"
));
assertFalse
(
StringUtils
.
containsAny
(
"test and retest"
,
".?()"
));
// Surrogate pair
assertTrue
(
StringUtils
.
containsAny
(
"test and \uD861\uDED7 retest."
,
"\uD861\uDED7"
));
// Ill-formed string
assertFalse
(
StringUtils
.
containsAny
(
"test and \uD861 retest."
,
"\uD861\uDED7"
));
// Ill-formed string
assertFalse
(
StringUtils
.
containsAny
(
"test and \uDED7 retest."
,
"\uD861\uDED7"
));
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment