How t ocheck if given String is in uppercase or lowercase????

how t ocheck if given String is in uppercase or lowercase????

You could compare the result of string.toUpperCase() to the string itself. If it was uppercase already, the 2 strings would be the same. I'll leave it up to you to work out how to check if it's lower case :-)

Similar Messages

  • How to find out no. of occurrences of a sting in a given string

    Hi all,
    How do I find out the no. of occurrences of a sting in a given string.
    Your help would be appreciated.
    Thank you,
    Srinivas

    user636994 wrote:
    calculating no. of occurance of a string
    declare
    str1 varchar2(100) :='string';
    str2 varchar2(1000) := 'This is the string where all the string are placed. This pl/sql is used to search the accurance of a string into an another string';
    begin
    dbms_output.put_line(length(str2) - length(replace(str2,str1,substr(str1,1,length(str1)-1))));
    end;
    /A slightly shorter (in length) version of that would be...
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2  str1 varchar2(100) :='string';
      3  str2 varchar2(1000) := 'This is the string where all the string are placed. This pl/sql is used to search the accurance of a string into an another string';
      4  begin
      5  --dbms_output.put_line(length(str2) - length(replace(str2,str1,substr(str1,1,length(str1)-1))));
      6    dbms_output.put_line((length(str2) - length(replace(str2,str1)))/length(str1));
      7* end;
    SQL> /
    4
    PL/SQL procedure successfully completed.
    SQL>

  • How to search for perticular substring in given string.

    Hi, Can any one tell me how to search for perticular substring in given string.
    example:
    I have to search for CA in given Order type it may be CA10 or CA15. Please Do the needful.

    Hi Aniruddha,
    check this...
    Data var string,
    var = 'India'.
    search var for 'Ind'.
    if sy-subrc = 0.    " var having ind
    Message 'Ind found' type 'I'.
    else  .            "var not having ind
    Message 'Ind not Found' type 'I'.
    endif.
    thanx
    bgan.

  • How can I search the tree with a given string?

    How can I search the tree with a given string?
    I don't find any function like "search(...)".
    I want to find the tree nodes which include the given string.
    Thanks.

    Try it with .com instead of .ca - fixes it for me (corporate firewall blocks .ca here)
    http://spendolini.blogspot.com/2013/09/working-with-apex-tree.html
    Anyway - it links to an article of mine which describes interacting with the tree: Tom's Blog: Working with the tree in Apex. There is also a demo application on apex.oracle.com: http://apex.oracle.com/pls/apex/f?p=54687:38

  • How to find no of numeric characters in a given string ???

    How to find no of numeric characters in a given string ???
    Thanks,
    Kathir

    sabre150 wrote:
    Use String.replaceAll() to replace any characters that are not numeric and then take the length of the resultant String....and this might be useful: [http://www.regular-expressions.info/]
    ;-)

  • How to check whether a char string is in uppercase or not

    Hi,
    I know how to convert strings to change strings to uppercase or lowercase, but is there any function to check, beforehand, if the field is in uppercase, for instance ? The intention here is simply to spare processing in situations where the string is already in uppercase, and thus not needing any further processing (given I want to turn the string into uppercase.)
    Thanks in advance,
    Avraham

    Hi Avraham ,
    To check whether the string is in upper case or not use CA keyward.
    To check  try the following code  ---
    DATA : W_STRING(5) TYPE C,
    W_ABCDE(26) TYPE C VALUE 'abcdefghijklmnopqrstuvwxyz'.
    w_string = 'abcd'.
    IF W_STRING CA W_ABCDE.
    TRANSLATE w_string TO UPPER CASE.
    ELSE.
    MESSAGE 'It is a uppercase string' TYPE 'S'.
    ENDIF.
    Try this link  this will definitely help you -
    https://wiki.sdn.sap.com/wiki/display/ABAP/Validationofastringintermsof+case
    Regards
    Pinaki

  • Find the alteast one number and one character in the given string

    Hi All,
    How to find the given input string it contains at least one alpha and one number.
    My test data like this
    test123 ->pass
    test -> Fail
    123test -pass
    123 -> Fail
    select * from dual where regexp_like ('test123','[0-9]')

    Purvesh K wrote:
    One of easiest ways:
    with data as
    select 'test123' col from dual union all
    select '123test' from dual union all
    select 'test' from dual union all
    select '123' from dual
    select *
    from data
    where regexp_like(col, '[[:digit:]]+[[:alpha:]]+|[[:alpha:]]+[[:digit:]]+', 'i');
    COL    
    test123
    123test
    Just a note - This will fail, if any characters like SPACE (or any non alpha numeric characters) appears in the string like..
    with data as
      select 'test 123' col from dual union all
      select '123test' from dual union all
      select 'test' from dual union all
      select '123' from dual
    select *
      from data
    where regexp_like(col, '[[:digit:]]+[[:alpha:]]+|[[:alpha:]]+[[:digit:]]+', 'i');Edited by: jeneesh on Mar 5, 2013 12:04 PM
    You could change like
    where regexp_like(col, '[[:digit:]].*?[[:alpha:]]|[[:alpha:]].*?[[:digit:]]', 'i');

  • Find files that match with given string, except one character in a fixed position

    Hi,
    I want to find files in a directory with a given string (ss-20140129-process-000*.sdx), where only one character will be mismatched, so have to use wildcard for that character. This means I am looking for filenames where everything needs to be matched except
    one character in position of "*". For the samples given below: 1st 3 files matched with the given string, but last 3 files have not matched, so first 3 files will be counted.
    ss-20140129-process-0001.sdx
    ss-20140129-process-0004.sdx
    ss-20140129-process-0009.sdx
    zx-20140129-process-0001.sdx
    bt-20140129-process-0002.sdx
    zx-20140129-process-0001.sdx
    I can use the command like (GCI -path $folder -filter ss-20140129-process-000?.sdx), BUT problem is i am building a string for the filter (code given below), where i DO NOT know how to use "?" within the string to make a character exception.
    Code:
    $datevalue = [datetime]::parseexact($trandate,"MMddyy",$null)
    $yyyymmdd = $datevalue.tostring('yyyyMMdd')
    $FileToCheck = ("ss-"+$yyyymmdd+"-process-000?.sdx")
    GCI -path $folder -filter $FileToCheck
    But it's definitely NOT working for syntax problem.
    Any help?

    I don't think it's a syntax issue in the filter.  This works fine for me:
    $yyyymmdd = '20140129'
    $FileToCheck = ("ss-"+$yyyymmdd+"-process-000?.sdx")
    Get-ChildItem -Path . -Filter $FileToCheck
    <#
    Output:
    Directory: C:\source\Temp\sdxtext
    Mode LastWriteTime Length Name
    -a--- 1/30/2014 10:16 AM 0 ss-20140129-process-0001.sdx
    -a--- 1/30/2014 10:16 AM 0 ss-20140129-process-0004.sdx
    -a--- 1/30/2014 10:16 AM 0 ss-20140129-process-0009.sdx
    #>
    You can try adding some debug output right before the call to Get-ChildItem. Check the values of $Folder and $FileToCheck, make sure they're correct. You can also fiddle with the values and call Get-ChildItem manually until it works, which would then tell you
    how the code needs to be changed.

  • HOW DO I WRITE A STRING TO FLAG WHEN A CELL HAS OR 17 CHARACTERS?

    HOW DO I WRITE A STRING TO FLAG WHEN A CELL HAS < OR > 17 CHARACTERS?

    Hi Tassytiger,
    A "string" is just a string of characters. Examples are qwerty, 123abc, 43πbono. there are several ways to write one. A more precise description of your end goal might help answer "How do I write a string."
    To the current version of your specific question:
    What I actually need to achieve is a situation where, when I enter <17 Char. or >17 Char.
    inadvertently then tab to the next cell, I get the following response in the active cell:
    The cell immediately below "17 character ID" displays an error triangle. These are shown when the formula in a cell produces an error message. they are system generated and require two things to happen: The cell must contain a formula AND something must have happened to cause that formula to produce an error.
    I don't wish to add any columns to my s/s but would like to apply the rule to the current column just as i would change the text or fill colour.
    The difficulty there is that a cell may contain entered data, OR it may contain a formula. You want to enter data (a string of characters) and you want to produce an error triangle if that string has more or fewer than 17 characters. Evaluating the length of the string requires a formula. Getting the string into the cell requires direct entry (in your scenario). The two are not compatible within the content of a single cell.
    Terry's example uses a formula in column B to measure the length of the string in column A. If the length is 17 characters, the IF statement produces the empty string ( "" ), and the cell in column B appears empty. If the string is not 17 characters long, the IF statement produces the string "Not 17 Chars!"
    His formula is easily changed to produce an error triangle in place of "Not 17 Chars!":
    B1: =IF(LEN(A1)=17, "",17/0)
    In this version, if the length of the string in A1 is not 17 (characters), the formula will attempt to divide 17 by 0, and will produce a 'division by zero' error.
    But, as with all of the other suggestions, this one will require a new column to provide space for the formula and it's result.
    Changing the text or fill colour can be done using conditional formatting. Changing content of the cell (eg. choosing between the entered string of characters and the error triangle) cannot.
    Conditional formatting rules compare the content of a the cell to be formatted with either a fixed value (written into the rule) or to the content of another cell. In my examples (and in Ian's examples) above the rules compared the content of the cell to be formattes to the number '17'. The number was generated by a formula which measured the length (in characters) of the text in the cell where the ID was entered, and reported that length as a number.
    A way to show a red triangle using conditional formatting is to use Image fill as the default fill of the cell, then use a colour fill as the conditional fill to hide the trialngle when the conditions are met. Here's the same example as used above, with this technique applied to column B:
    The same formula is used in column B as in my previous example. Type size is set to 1 point (note the black dot, visible in the green filled cell) to keep the numbers from obscuring the triangles. The triangles are shapes, inserted onto the canvas (not into the table) from the Shapes button in the tools. Their fill colour has been changed to red, a 12 point exclamation sign character ha been typed into the shape and its text colour set to white, and the triangle's size has been reduced as much as possible without triggering the overflow symbol (boxed plus sigh) to appear.
    The triangle image (and some of its white background) was made into a png image file by taking a screen shot, and the image was inserted into all of the cells in the body rows of column B as an image fill, using the Graphic inspector. The conditional format rule below was then applied to the body row cells in column B.
    Finally, you can apply conditional formatting to the cell containing the ID. This will still require another column to contain the values to which the content of the ID cell will be compared, but that column may be hidden, or may be located on a separate table.
    The method requires an second cell for each cell contining an ID, and uses a formula that makes the contents of the second cell the same as that of the ID cell IF the ID cell contents are 17 characters long.
    Here's a sample. Table 1 is column A of the same table as above. Table 2 is a single column table holding the comparison cells.
    As in the example above, the cells on table 1 were given an image fill. The conditional format rule replaces that with a white colour fill when the cell contains the same text as its partner cell in Table 2.
    This is the rule for cell A2. In A3, the cell reference is to Table 2::A3, and in A4, to Table 2::A4. The cell references in conditional format rules must be edited individually.
    Regards,
    Barry

  • How many pixels does a string occupy??

    I'm making a credit script and have a little problem with centering the
    strings. If one string is eg. 12 characters long how many pixels will it occupy on screen? This depends on which letters the string contains. So the question is, HOW can i calculate the space (in pixels) needed to print any given string. (The size of the letters is constant!)
    Is it any other way to center a string on screen? I have a tendency to think a little complicated.. :)
    Any help is welcome. Code or just ideas is great!

    Hi
    There's a Graphics method very interesting:
    g.getFontMetrics()
    it recover the width of an String...Code of sample: (Sorry, but I'm from Spain and my code too):
    public void paint(Graphics g)
    g.setColor(cLinea);
    g.draw3DRect(5,5,iAncho-10,iAlto-10,true);
    g.draw3DRect(6,6,iAncho-12,iAlto-12,true);
    Color c=this.getBackground();
    if(!bAgra)
    { g.setColor(Color.orange); }
    else
    { g.setColor(cObligatorio); }
    g.fill3DRect(7,7,iAncho-13,iAlto-13,true);
    g.setColor(cLetra);
    g.setFont(new Font("Dialog",Font.BOLD,iSize));
    //Next line recover the X position referenced by the canvas width/2 and the text width/2...result:CENTERED
    int posX=(iAncho/2)-(g.getFontMetrics().stringWidth(sTitulo)/2);
    //Oopss. I've tried to do a vertical align to center, but it doesn't work properly...
    int posY=(iAlto/2);
    g.drawString(sTitulo,posX,posY+5);
    If you need more help about this code, don't worry to ask me again
    Greetings

  • How to automatically google a string periodically from a shell script?

    I am trying to figure out the best way to automatically google search on a certain given string, periodically (say once per hour). I think I can set up the launchd script properly, but am wondering how one might use curl or wget to search a specific string (say, for example, the Fourth Amendment to the US Constitution).
    I figure it might be nice to have that firmly in my database.

    Hey Bill,
    There are many ways to do this in unix. Here's a wget example:
    Note, first I got the URL that google would use to search for the 4th amendment, this is:
    http://www.google.com/search?client=opera&rls=en&q=4th+amendment&sourceid=opera& ie=utf-8&oe=utf-8
    Next I shrunk it down to a more manageable size using www.tinyURL.com to:
    http://tinyurl.com/9fb35
    now for wget you could run, say:
    google_search=`wget -q -O- -U opera "http://tinyurl.com/9fb35"`
    (I'm using bash here, so you'll have to change the assignment syntax for a different shell)
    What's important here is the "-U opera" flag to wget. This sets wget to identify as a specific user:agent, and without it, Google search will return a 404. Also, instead of making a tinyURL out of that whole URL, I could have used:
    http://www.google.com/search?q=4th+amendment
    but I like using tinyURLs, and with a long-ish seach query it becomes useful very quickly.
    Now, with curl you could use:
    google_search=`curl -s -A opera "http://www.google.com/search?q=4th+amendment"`
    The user:agent flag is important when using curl with the Google search also, since you'll get a 404 (albeit a strange one) if you don't. Also, curl doesn't seem to want to play well with the tinyURL redirection.
    What you could do instead of use the tinyURL is set the URL to a variable, like;
    searchurl="http://www.google.com/search?q=4th+amendment"
    then you could simply run the command:
    google_search=`curl -s -A opera "${searchurl}`
    Hope this helps!
    Powerbook G4   Mac OS X (10.4.4)   1.25 GHz, 1GB RAM

  • How to Plot number and string in one row (data logger counter) ?

    hi all i made data log quantity using Digital Counter via modbus to monitoring quantity and reject that has and Name Operator, Machine and Part Number.
    i have problem about plot the number & string in one row, as shown on the picture below :
    how to move that string on one row ? i attach my vi.
    Thanks~
    Attachments:
    MODBUS LIB Counter.vi ‏39 KB

    Duplicate and answered - http://forums.ni.com/t5/LabVIEW/How-to-Plot-number-and-string-in-one-row-data-logger-counter-via/m-p...

  • How can I send multiple string commands into a VISA write?

    Hi Fellow LabVIEW users
    I am very new to LabVIEW (2.5 months) so please forgive me if my lingo is not up to par.
    How can I send multiple string commands to a VISA write. For example each string command looks like this
    1) 3A00 0000 0000 FFFF FFFF FFFF 0000 0000 FF00 0000 0000 0000 0000 0033 (Scenario 1)
    2) 3A01 0000 0000 FFFF FFFF FFFF 0000 0000 FF00 0000 0000 0000 0000 0034 (Scenario 2)
    3) 3A01 0000 0000 33FF FFFF FFFF 0000 0000 FF00 0000 0000 0000 0000 0067 (Scenario 3).
    and so on and so forth. And there are a number of scenarios.
    Each String scenario will give a different string output which will be interpreted differently in the front panel.
    Right now I have to manually change the string commands on the front panel to give me the desired output. How can I do this without manually changing the commands i.e. hard coding each scenario into the block diagram?
    Thanks, any feedback will help.
    mhaque

    Please stick to your original post.

  • How to use multiple VCI strings for lap 1300 and 1200 (option 60) in one pool?

    Hi All,
    Hope to you a very happy new year,
    I have two differnt LAP 1300 and 1200 in my network and I need to add theme to the WLC,
    I successed to add one of theme by the option 60 in the DHCP pool at the Core SW,
    So my quetion is below:
    How to use multiple VCI strings for lap 1300 and 1200 (option 60) in one pool?
    Thanks in Advanced,
    Ahmed,

    To add to Scott's post.  Option 60 would be useful if you needed to put certain types of AP on specific controllers.  Otherwise, no real need to use it for the most part.
    Though, I do recall an issue a few years ago that some windows machines had issues getting DHCP if option 43 is being returned.
    Now, on an IOS switch, you can only configure one option 60 per DHCP scope
    HTH,
    Steve
    Please remember to rate useful posts, and mark questions as answered

  • How to search a special string in txt file and return it's position in txt file?

    How to search a special string in txt file and return it's position in txt file?

    I just posted a solution for a similar question here:  http://forums.ni.com/ni/board/message?board.id=170​&view=by_date_ascending&message.id=362699#M362699
    The top portion can search for the location of a string, while the bottom portion is to locate the position of a character.  Both can search for a character.
    The position of the character within the file is displayed in the indicator(s).
    R

Maybe you are looking for

  • How to include a license header in fxml file?

    How to include a license header in fxml file? I tried xml block comments <!-- mylicense here --> but it wasn't accepted by screen builder. Also I wondered, even if it had been accepted, would screen builder have saved the header back - or deleted it?

  • Problem With MF 2727 nj

    We have just bught and installed Hp MF 2727nf while giving multiple copie sof signle document instea dof printing it on more than 1 paper its printing it in duplex mode on the same paper .... how can i make it print on single paper withotu duplex and

  • Oracle 8.1.7 on Linux

    I am able to install oracle on Rad Hat Linux 7.1 But I am not able to configure it. So I cant start the databse. Any body can tell me the possible causes for this. and solution if possible. Thank you.

  • Finesse 10.5(1) Outbound, no Callback button or Outbound Variables

    Hi All, I can't figure out why Finesse 10.5.1/UCCX 10.5.1 is not showing the Callback button while talking on an outbound call.  Also the Outbound ECC variables don't show up, but the normal ECC variables that are set in the script do show.  Is it po

  • Having Adobe try scam me into thinking i have virus

    Called on to have tech help me install Adobe photoshop CS5 but they remotely logged into my computer and told me would not be able to install because having virus then they wanted to know if I wanted them to remove it for a cost. I said no went to Ap