Finding the 1st place character

Hi,
I have string and I want to check what character is present at the 1st place of the string.Can anyone tell how to do this?
Thanks.

Hi,
Just use offsets.
data: temp type string value 'abc123'.
data: result(1) type c.
result = temp+0(1).
write: result.
Regards,
Vikranth

Similar Messages

  • Strings: Finding the index value of the 1st alphabet character

    Hi
    I'm trying to find a way of finding the index position of the 1st alphabetic character i.e. letters from "a" to "z" in a string line.
    I've tried looking at the java doc pages on the String Class which contains methods such "indexOf" but i'm very confused on how this all works??
    Could someone please help me.
    Thanks
    Rahul

    Another way is to use regular expressions:
    import java.util.regex.*;
    class RegExTest {   
        public int indexOfRegEx(String regex , String inString){
            Pattern p = Pattern.compile(regex);
            Matcher m = p.matcher(inString);
            boolean found = m.find();
            return found ? m.start() : -1;
        public static void main(String[] args) {
            RegExTest test = new RegExTest();
            System.out.println(test.indexOfRegEx("[A-Za-z]", "a124321"));
            System.out.println(test.indexOfRegEx("[A-Za-z]", "12A4321"));
            System.out.println(test.indexOfRegEx("\\p{Alpha}", "124321"));
            System.out.println(test.indexOfRegEx("\\p{Alpha}", "124321a"));
    }

  • I have a iphone 4s with ios 8.3 and I used to be able to sync only a week or two of emails from outlook email.  Now it won't let me do that and it syncs all my inbox.  How can I change it back to sync less.  I can't find the right place.

    I have a iphone 4s with ios 8.3 and I used to be able to sync only a week or two of emails from outlook email.  Now it won't let me do that and it syncs all my inbox.  How can I change it back to sync less.  I can't find the right place.

    I understand, as that was the place I would change it before 8.3 but now that option of Mail Days to Sync is not available?  Any idea why that would be?

  • HT4539 I have 2 year old I-phone 4 that has never been updated. I need to download an update from my computer but can not find the right place on the I-Tunes page. Do you know where is the right place to update a phone that does not have an "update" butto

    My (old, never updated) I-phone has no "update" button in Settings and I would like to update it. I can not find the right place on I-Tunes to download the updates. Do you know where to look?

    Update your iPhone, iPad, or iPod touch - Support - Apple

  • How can i find the 1st business day of the week ?

    Hi,
    How can i find the 1st business day of the week excluding saturaday,sunday and holidays? i have holiday table which contains the columns name HolidayDate and HolidayDescription.
    Ex:
    10-1-2011 is monday(i.e) 1st business day.check If it is in holiday table,then return the result as 11-1-2011 else return the result as 11-1-2011(which is the first business day of this week).
    Can anyone tell me the Query to solve it?

    Does this help:
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (SELECT TRUNC(SYSDATE,'IW') holiday FROM dual
      2  UNION SELECT TRUNC(SYSDATE + 7,'IW') from dual)
      3  SELECT MIN(Dat),wk FROM
      4  (SELECT TO_CHAR(dat,'IW') wk,dat FROM
      5  (SELECT dat + lvl dat FROM
      6  (SELECT TRUNC(SYSDATE,'RRRR') dat, level - 1 lvl
      7  FROM dual
      8  CONNECT BY level <= TO_DATE('31-DEC'||TO_CHAR(SYSDATE,'RRRR')) - TRUNC(SYSDATE,'RRRR'))
      9  ) x
    10  WHERE x.dat NOT IN (select holiday from t))
    11  WHERE TO_CHAR(Dat,'DY') <> 'SAT'
    12  AND TO_CHAR(dat,'DY') <> 'SUN'
    13* group by wk
    SQL> /
    MIN(DAT)  WK
    04-JAN-11 01  -- since 03-JAN-2011 is in holiday list, 04 is taken as first business day of first week
    11-JAN-11 02  -- similar to week 1
    17-JAN-11 03
    24-JAN-11 04
    31-JAN-11 05
    07-FEB-11 06
    14-FEB-11 07
    21-FEB-11 08
    28-FEB-11 09
    07-MAR-11 10
    14-MAR-11 11
    21-MAR-11 12
    28-MAR-11 13
    04-APR-11 14
    11-APR-11 15
    18-APR-11 16
    25-APR-11 17
    02-MAY-11 18
    09-MAY-11 19
    16-MAY-11 20
    23-MAY-11 21
    30-MAY-11 22
    06-JUN-11 23
    13-JUN-11 24
    20-JUN-11 25
    27-JUN-11 26
    04-JUL-11 27
    11-JUL-11 28
    18-JUL-11 29
    25-JUL-11 30
    01-AUG-11 31
    08-AUG-11 32
    15-AUG-11 33
    22-AUG-11 34
    29-AUG-11 35
    05-SEP-11 36
    12-SEP-11 37
    19-SEP-11 38
    26-SEP-11 39
    03-OCT-11 40
    10-OCT-11 41
    17-OCT-11 42
    24-OCT-11 43
    31-OCT-11 44
    07-NOV-11 45
    14-NOV-11 46
    21-NOV-11 47
    28-NOV-11 48
    05-DEC-11 49
    12-DEC-11 50
    19-DEC-11 51
    26-DEC-11 52
    52 rows selected.
    SQL>

  • How can if find the most repeated character and number ???

    Hi,
    I have a question. For instance, if we have a text file which contains:
    aaabbbhhhhhhtttttsjs12366
    How can i find the most repeated character and number. I have to add this code to the following program:
    I will aprreciate if you can help.
    Regards,
    Serkan
    import java.io.*;
    public class LineLen {
         public static void main(String args[]) throws Throwable {
              final String filename = "deneme1.txt";
              BufferedReader infile = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
              String line = infile.readLine();
              int linenum = 0;
              while (line != null) {
                   int len = line.length();
                   linenum++;
                   System.out.print(linenum + "\t");
                   for (int i = 0; i<len; i++)
                   System.out.print("*");
                   System.out.println("");
                   line = infile.readLine();
    }

    For a small alphabet like English, array migt be used:
    //in a for loop
    ++array[s.charAt(i)];For a big alphabet like chinese, HashMap might be barely used:
    map.put(s.charAt(i), increment(map.get(s.charAt(i))));
    // increment is a user defined method, possibly for an Integer object,
    // that returns a new Integer object

  • Any Searches at any Search site if I dont CLICK a site within (2) seconds all these pages load up that has nothing to do whith my friggin search in the 1st place how do I fix this ?

    Any Searches at any Search site if I dont CLICK a site within (2) seconds all these pages load up that has nothing to do whith my friggin search in the 1st place how do I fix this ?

    Thanks for the quick advice!
    Unfortunately, I am still unable to open my core productivity apps, namely Skype and Evernote. Twitter, as well, could not start. But interesting quick fix though, I never knew you could do that.
    Here's the error log after the restart:
    What else should I try?

  • I did not find the right place for my question but Is Apple's products are shipped to the Gulf States by a company Aramex ?

    I did not find the right place for my question but Is Apple's products are shipped to the Gulf States by  Aramex ?

    An absolute URL will be a complete URL, it traces from the abosulte root of a file's location on a server...
    http://www.thesite.com/assets/images/Front_Page_Rotating_Banner/banners.xml
    A relative URL is anything short of including the http://domain..., and is read relative to wherever the file using it exists
    assets/images/Front_Page_Rotating_Banner/banners.xml
    In Flash files though, relative links need to be specified relative to the HTML page that embeds the swf.  So if the swf is in a different folder than the html page that embeds it, the swf's targeting must be adjusted as if it were actually in the html file's folder.

  • Cannot find the right place to download the replacement for lost PS CS6 Extended

    My PC with Windows 8.1 became corrupted.  I reloaded the OS and thereby lost all of my apps.  I cannot find the right place to download the replacement Photoshop CS6 Extended app. 
    Under Download CS6 products  I receive an access denied error. 
    How do I download PS CS6 Extended?

    John70b the downloads do appear to be working.  Please try using a different web browser to begin the download process.

  • Hi there, I just would like to suppress my ADOBE ID but I didn't find the right place to post my question ! Could you help me ?

    Hi there, I just would like to suppress my ADOBE ID but I didn't find the right place to post my question ! Could you help me ?

    What do you mean by "suppress my ADOBE ID" ?
    The following link might be useful.
    For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
    Adobe ID and registration chat support (non-CC)
    http://helpx.adobe.com/x-productkb/global/service-c1.html ( http://adobe.ly/19r6ZDp )

  • It's cracked and i can't find the warranty place, where is it

    i've looked everywhere, but i can't find the warranty stuff.
    Philips   Windows XP  

    I am not sure what you are asking but Apple should have all the warranty/regristry material because you registered your iPod online.
    Take it to an Apple store if you can.
    http://www.apple.com/legal/warranty/

  • Finding the occurences of | character in a string

    Hi There,
    I want to restrict the occurrences of | character in a string to some number. How can I make this check using regular expressions.
    Thanks,
    --JJ                                                                                                                                                                                                                                                                                                                               

    sabre150 wrote:
    guitar_man_F wrote:
    sabre150 wrote:
    jose wrote:
    So can you please suggest me a sample regex which will do this.
    --JJErr.. err.. err.. reply #2?Not quite. I believe he said restrict it to a certain max number of |, not remove all instances. I think.
    Look again. I remove anything that is NOT a '|' char and then count what is left.Oops! My bad! You're right. That would work.
    - Adam

  • How do you select/find the right place in the menu to get Netflix

    I just purchased an apple tv in order to get netflix instantly on my hd tv and I can not for the life of me figure out how to program the device to get my access code that I need to provide to netflix to start watching movies instantly on my tv.  The apple tv is configured to my wifi network and I am seeing the menu but can't seem to get any farther than that.

    Hi Cris,
    welcome to Sdn forum!
    For question 1, i think you can do this using pld.
    For question 2, to be able to view other tables, you will need to hold the ALT button and press the database table(Properties section on the lower right portion of the PLD screen), you can now view other tables. then to join other tables you will need to RELATE to and Next Segment, you can also find this under Properties and go to Content Tab.
    for question 3, you will need to create a query that will lead you to the exact field name, say for example SELECT Price from POR1, this price is actually variable 81 from purchase order line and the equivalent value is the por1.price..
    Regards,
    Darius Gragasin

  • How to find the 1st sunday in a month

    v_end := '01-nov-' || in_year;
    v_sql_text := 'select next_day('''||v_end||''',''sunday'')+7 from dual';
    this works except that nov 1st is a sunday. better idea?

    Warren, besides being a big overkill (comparing to NEXT_DATE solution), it is, same as NEXT_DAY solution, NLS dependent. Assume you have a client in Germany:
    SQL> alter session set nls_date_language=german;
    Session altered.
    SQL> select next_day(sysdate,'SUNDAY') from dual;
    select next_day(sysdate,'SUNDAY') from dual
    ERROR at line 1:
    ORA-01846: not a valid day of the week
    SQL> NLS independent solution I am aware of is based on Julian date 1 being Tuesday and therefore Julian date 6 being SUnday:
    SQL> select to_char(to_date('1','J'),'Day') from dual;
    TO_CHAR(T
    Tuesday
    SQL> select to_char(to_date('6','J'),'Day') from dual;
    TO_CHAR(T
    Sunday
    SQL> Therefore, NLS independent first Sunday of the month is:
    SQL> alter session set nls_date_format='FMDay, Month DD YYYY';
    Session altered.
    SQL> alter session set nls_date_language=american;
    Session altered.
    SQL> SELECT NEXT_DAY(
      2                  TRUNC(SYSDATE, 'MM') - 1,
      3                  to_char(to_date('6','J'),'Day')
      4                 )
      5    FROM dual
      6  /
    NEXT_DAY(TRUNC(SYSDATE,'MM')
    Sunday, February 4 2007
    SQL> alter session set nls_date_language=german;
    Session altered.
    SQL> SELECT NEXT_DAY(
      2                  TRUNC(SYSDATE, 'MM') - 1,
      3                  to_char(to_date('6','J'),'Day')
      4                 )
      5    FROM dual
      6  /
    NEXT_DAY(TRUNC(SYSDATE,'MM')-
    Sonntag, Februar 4 2007
    SQL> alter session set nls_date_language=french;
    Session altered.
    SQL> SELECT NEXT_DAY(
      2                  TRUNC(SYSDATE, 'MM') - 1,
      3                  to_char(to_date('6','J'),'Day')
      4                 )
      5    FROM dual
      6  /
    NEXT_DAY(TRUNC(SYSDATE,'MM'
    Dimanche, Février 4 2007
    SQL> SY.

  • My husband and I have the same itunes password.  When I tried to set up his own, it said that I could not use his email address because it is a back up address on mine.  How can I change that....can't find the right place to go.  Thanks

    My husband and I have the same itunes password.  When I tried to set up a separate one for him, it said that his email address was used as a backup on my phone so it could not have its own address.  Where do I go to remove his address as my backup address....thanks

    Hi theirmimi,
    Go to Manage your Apple ID (on a computer) and sign in with your Apple ID. Then you can edit the email information on your account:
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    Cheers,
    GB

Maybe you are looking for