java - Identifying capital letters in a string and the position -


so have string h

and want scan string , check if letter @ point capital , if is: store position of capital letter in array.

i believe regex tool want use i'm unable decipher how works.

is there way like:

int = 0; int j = 0; int length = h.length() int[] positionalarray = new int[length]; while(i < length) {    if(h[i]iscapital) //or along lines:    {        positionalarray[j] = i;        j++;    } } 

where crux of solution 'what correct syntax simulate' h[i]iscapital

what need is

character.isuppercase(h.charat(i)); 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -