string function

This is a discussion on string function within the C++ Programming forums, part of the General Programming Boards category; Would anyone know of a function, or be able to write me a function that takes two parameters. String A, ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    44

    string function

    Would anyone know of a function, or be able to write me a function that takes two parameters. String A, and B. then returns true if String B is part of String A? I tried several times, and can't seem to get it right. Any help is most appreciated. Thanks.

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,641
    string.h

    strstr()

    Returns null if not found.
    Code:
    if( numeric_limits< byte >::digits != bits_per_byte )
        error( "program requires bits_per_byte-bit bytes" );
    24bbs.cpp

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 04-25-2008, 02:45 PM
  2. String Class
    By BKurosawa in forum C++ Programming
    Replies: 117
    Last Post: 08-09-2007, 01:02 AM
  3. String issues
    By The_professor in forum C++ Programming
    Replies: 7
    Last Post: 06-12-2007, 09:11 AM
  4. Replies: 4
    Last Post: 03-03-2006, 01:11 AM
  5. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 01:28 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21