开发者

a word that begins with an uppercase accented (java) [duplicate]

This question already has answers here: 开发者_开发百科 Closed 11 years ago.

Possible Duplicate:

Detecting words that start with an accented uppercase using regular expressions

in java ,how to test if a string begins with an uppercase letter accented ,like this Ëfdk,Ä...

do you have some ideas


You can use Character.isUppercase() method.

public class MainClass {
  public static void main(String args[]) {
     System.out.println(Character.isUpperCase('C'));
  }
}

See Javadoc


   String s="Ëfdk,Ä";
   char[] a = s.toCharArray();
   for (int i=0;i<a.length;i++)
   {
       if ( a[i] != null && Character.isUpperCase(a[i]))
           System.out.println(a[i]);
   }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜