diff options
author | Eike Stepper | 2015-02-09 19:48:12 +0000 |
---|---|---|
committer | Eike Stepper | 2015-02-18 14:41:11 +0000 |
commit | 9bcd1f30ff1774ff7e66c36ef8b200ef318a164c (patch) | |
tree | 942d3276a7df824dbe8c6fceef108060c58d23ad /plugins/org.eclipse.net4j.util | |
parent | a5244cfa65cf4b9bf8c9e53665842fe20261d265 (diff) | |
download | cdo-9bcd1f30ff1774ff7e66c36ef8b200ef318a164c.tar.gz cdo-9bcd1f30ff1774ff7e66c36ef8b200ef318a164c.tar.xz cdo-9bcd1f30ff1774ff7e66c36ef8b200ef318a164c.zip |
[458349] Consolidate UI
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=458349
Diffstat (limited to 'plugins/org.eclipse.net4j.util')
-rw-r--r-- | plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/StringUtil.java | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/StringUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/StringUtil.java index 0b22c222a4..5623d61299 100644 --- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/StringUtil.java +++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/StringUtil.java @@ -196,6 +196,29 @@ public final class StringUtil return builder.toString(); } + public static String cap(String str) + { + if (str == null || str.length() == 0) + { + return str; + } + + char first = str.charAt(0); + if (Character.isUpperCase(first)) + { + return str; + } + + if (str.length() == 1) + { + return str.toUpperCase(); + } + + StringBuilder builder = new StringBuilder(str); + builder.setCharAt(0, Character.toUpperCase(first)); + return builder.toString(); + } + /** * @since 2.0 */ @@ -223,29 +246,6 @@ public final class StringUtil return builder.toString(); } - public static String cap(String str) - { - if (str == null || str.length() == 0) - { - return str; - } - - char first = str.charAt(0); - if (Character.isUpperCase(first)) - { - return str; - } - - if (str.length() == 1) - { - return str.toUpperCase(); - } - - StringBuilder builder = new StringBuilder(str); - builder.setCharAt(0, Character.toUpperCase(first)); - return builder.toString(); - } - public static String uncap(String str) { if (str == null || str.length() == 0) |