Thread: Need help on substrings and streams

  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    103

    Need help on substrings and streams

    So i understand the substring method takes the first char position, and then takes in the the length (amount of chars after that initial position). But how would I determine that position if I'm passing in a stream? (the initial position stays the same but the length is always changing)?

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    How many characters do you want, is what the function is asking for, not how many there are. (If you want "all the characters to the end", then leave it off and that's the default parameter.)

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    What substring method are you talking about? substr()? How can you pass a stream to the substring method?

Popular pages Recent additions subscribe to a feed