Search:

Type: Posts; User: copeg

Search: Search took 0.17 seconds.

  1. Thread: String counter

    by copeg
    Replies
    9
    Views
    2,968

    Re: String counter

    indexOf gives you the position of the first occurrence of a string within a string, or -1 if it isn't found. Read the API for a full description. I'm not going to do it for you, but this should...
  2. Thread: String counter

    by copeg
    Replies
    9
    Views
    2,968

    Re: String counter

    Look into using the indexOf method of String.
    Defined as:


    public int indexOf(String str,
    int fromIndex)

    You can use this method to iterate through the string quite easily...
Results 1 to 2 of 2