Thread: Seperate string into 2 based on last + sign in the string

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    13

    Smile Seperate string into 2

    Hi,

    If I have this string 'Hello+Julie+I-was-here', how do I get this expecting result with C programming?

    'Hello+Julie'

    'I-was-here'

    Another example,

    String: 'I+am+really+tired+mememe-is-now-at-home'

    Result:

    'I+am+really+tired'
    'mememe-is-now-at-home'

    As noticed, I will want to break up my string into 2. Based on the last + sign from the back in the string, I will separate the string into 2 separate strings. How am I suppose to do this?
    Last edited by JuzMe; 04-18-2009 at 03:49 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. find a string based on the location of another string
    By rlilley in forum C Programming
    Replies: 3
    Last Post: 02-19-2009, 12:29 PM
  2. OOP Question DB Access Wrapper Classes
    By digioz in forum C# Programming
    Replies: 2
    Last Post: 09-07-2008, 04:30 PM
  3. String Class
    By BKurosawa in forum C++ Programming
    Replies: 117
    Last Post: 08-09-2007, 01:02 AM
  4. RicBot
    By John_ in forum C++ Programming
    Replies: 8
    Last Post: 06-13-2006, 06:52 PM
  5. can anyone see anything wrong with this code
    By occ0708 in forum C++ Programming
    Replies: 6
    Last Post: 12-07-2004, 12:47 PM

Tags for this Thread