×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Aug 2008
    Location
    Pune
    Posts
    223

    splitting string

    Hi All,
    i am new to j2me ,trying to do an appli in that I am read a .txt file containing 2 double numbers seperated by pipe character .
    e.g
    12.123456|13.123456
    I want split this string and collect output in 2 diff variables in following fashion--

    num1=12.123456
    num2=13.123456
    please help me to solve this problem......ASAP
    Thanx...

  2. #2
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: splitting string

    Hi,
    You can write your own split method. Take the index of your separator (Incase of you it is pipe) get the substring of that and copy that to one vector , incremet your separator index... untill you reach the end or no separator found..

    http://discussion.forum.nokia.com/fo...ad.php?t=97769
    http://forums.sun.com/thread.jspa?messageID=3827134

  3. #3
    Regular Contributor
    Join Date
    Aug 2008
    Location
    Pune
    Posts
    223

    Re: splitting string

    Thanx 4 reply Bhanu........

  4. #4
    Registered User
    Join Date
    May 2010
    Posts
    22

    Re: splitting string

    Hi all

    I wrote an app that writes textfield data to a text file on the device memory card. I can also read the text file and split the various substrings back into the correct textfields. Now i want to know if its possible to change the data in one of the textfields and then to update the string in the text file to only update the changed substring data, i.e. the original string in the text file looks like this:

    John|Adams|33|Male|Single

    Now i want to update the string in the text file to look like this:

    John|Adams|33|Male|Married

    Please can anyone help me with some example code if this is possible??

Similar Threads

  1. Send string data from symbian to .net
    By ahlmans in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2008-01-16, 13:40
  2. How to use Gauge/Process Bar when using HttpConnection?
    By Tanya in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2006-12-28, 07:59
  3. global root overflow(please help)
    By sushant_125 in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2004-05-14, 08:24
  4. Personal
    By JSmith77 in forum PersonalJava
    Replies: 4
    Last Post: 2003-07-30, 12:52
  5. D211 new linux driver 1.04 not working !!
    By franz_meyer in forum Multimodecards
    Replies: 1
    Last Post: 2002-12-12, 08:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •