diff options
Diffstat (limited to 'src/java/com/jogamp/gluegen/CodeGenUtils.java')
-rw-r--r-- | src/java/com/jogamp/gluegen/CodeGenUtils.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/java/com/jogamp/gluegen/CodeGenUtils.java b/src/java/com/jogamp/gluegen/CodeGenUtils.java index 76116f1..5442a24 100644 --- a/src/java/com/jogamp/gluegen/CodeGenUtils.java +++ b/src/java/com/jogamp/gluegen/CodeGenUtils.java @@ -44,6 +44,20 @@ import java.util.*; public class CodeGenUtils { /** + * Converts first letter to upper case. + */ + public static String capitalizeString(final String string) { + return Character.toUpperCase(string.charAt(0)) + string.substring(1); + } + + /** + * Converts first letter to lower case. + */ + public static String decapitalizeString(final String string) { + return Character.toLowerCase(string.charAt(0)) + string.substring(1); + } + + /** * Given a java package name (e.g., "java.lang"), return the package as a * directory path (i.e., "java/lang"). */ |