character


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: character

  1. #1
    alex Guest

    character


    If a pull a a value from a text file and that value at the end has a period
    for example: value "hello." How can I get rid of the period and just grab
    the "hello" value. Assuming that I don't know the length of the value.

  2. #2
    Paul Clapham Guest

    Re: character

    What do you mean, assuming you don't know the length of the value? You can
    easily find the length of the value. I think if you clarify your question,
    you will then be able to get an answer. What is it you want to do? Delete
    all periods? Delete the last character? Delete the last character only if
    it is a period?

    PC2

    "alex" <cad1374@yahoo.com> wrote in message news:3b5575b7$1@news.devx.com...
    >
    > If a pull a a value from a text file and that value at the end has a

    period
    > for example: value "hello." How can I get rid of the period and just

    grab
    > the "hello" value. Assuming that I don't know the length of the value.




  3. #3
    Gautam Guest

    Re: character


    Hi,
    Take all the contents of the file in a string and use StringTokenizer
    or StreamTokenizer. Does this solve the problem. If not, then I may send
    you some sample codes for the same.



    "Paul Clapham" <pclapham@core-mark.com> wrote:
    >What do you mean, assuming you don't know the length of the value? You

    can
    >easily find the length of the value. I think if you clarify your question,
    >you will then be able to get an answer. What is it you want to do? Delete
    >all periods? Delete the last character? Delete the last character only

    if
    >it is a period?
    >
    >PC2
    >
    >"alex" <cad1374@yahoo.com> wrote in message news:3b5575b7$1@news.devx.com...
    >>
    >> If a pull a a value from a text file and that value at the end has a

    >period
    >> for example: value "hello." How can I get rid of the period and just

    >grab
    >> the "hello" value. Assuming that I don't know the length of the value.

    >
    >



  4. #4
    Gautam Guest

    Re: character


    Hi,
    Take all the contents of the file in a string and use StringTokenizer
    or StreamTokenizer. Does this solve the problem. If not, then I may send
    you some sample codes for the same.


    "alex" <cad1374@yahoo.com> wrote:
    >
    >If a pull a a value from a text file and that value at the end has a period
    >for example: value "hello." How can I get rid of the period and just grab
    >the "hello" value. Assuming that I don't know the length of the value.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center