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
50e61b86
Commit
50e61b86
authored
12 years ago
by
Jean Chalard
Browse files
Options
Downloads
Patches
Plain Diff
Remove an unused function (A8)
Change-Id: I0578068946d32192c4faf14b3e86624b7301c7d9
parent
2c0d9162
No related branches found
No related tags found
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
-17
0 additions, 17 deletions
java/src/com/android/inputmethod/latin/StringUtils.java
tests/src/com/android/inputmethod/latin/StringUtilsTests.java
+0
-11
0 additions, 11 deletions
...s/src/com/android/inputmethod/latin/StringUtilsTests.java
with
0 additions
and
28 deletions
java/src/com/android/inputmethod/latin/StringUtils.java
+
0
−
17
View file @
50e61b86
...
...
@@ -124,23 +124,6 @@ public final class StringUtils {
return
true
;
}
/**
* Returns true if cs contains any upper case characters.
*
* @param cs the CharSequence to check
* @return {@code true} if cs contains any upper case characters, {@code false} otherwise.
*/
public
static
boolean
hasUpperCase
(
final
CharSequence
cs
)
{
final
int
length
=
cs
.
length
();
for
(
int
i
=
0
,
cp
=
0
;
i
<
length
;
i
+=
Character
.
charCount
(
cp
))
{
cp
=
Character
.
codePointAt
(
cs
,
i
);
if
(
Character
.
isUpperCase
(
cp
))
{
return
true
;
}
}
return
false
;
}
/**
* Remove duplicates from an array of strings.
*
...
...
This diff is collapsed.
Click to expand it.
tests/src/com/android/inputmethod/latin/StringUtilsTests.java
+
0
−
11
View file @
50e61b86
...
...
@@ -90,17 +90,6 @@ public class StringUtilsTests extends AndroidTestCase {
StringUtils
.
removeFromCsvIfExists
(
"key"
,
"key1,key,key3,key,key5"
));
}
public
void
testHasUpperCase
()
{
assertTrue
(
"single upper-case string"
,
StringUtils
.
hasUpperCase
(
"String"
));
assertTrue
(
"multi upper-case string"
,
StringUtils
.
hasUpperCase
(
"stRInG"
));
assertTrue
(
"all upper-case string"
,
StringUtils
.
hasUpperCase
(
"STRING"
));
assertTrue
(
"upper-case string with non-letters"
,
StringUtils
.
hasUpperCase
(
"He's"
));
assertFalse
(
"empty string"
,
StringUtils
.
hasUpperCase
(
""
));
assertFalse
(
"lower-case string"
,
StringUtils
.
hasUpperCase
(
"string"
));
assertFalse
(
"lower-case string with non-letters"
,
StringUtils
.
hasUpperCase
(
"he's"
));
}
private
void
onePathForCaps
(
final
CharSequence
cs
,
final
int
expectedResult
,
final
int
mask
)
{
int
oneTimeResult
=
expectedResult
&
mask
;
assertEquals
(
"After >"
+
cs
+
"<"
,
oneTimeResult
,
StringUtils
.
getCapsMode
(
cs
,
mask
));
...
...
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