Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::memory::StrStr Function
C++
Parameters 
Description 
TEXTSTR s1 
the string to search in 
CTEXTSTR s2 
the string to locate 

NULL if s2 is not in s1. 

The beginning of the string in s1 that matches s2.

Finds an instance of a string in another string. 

Custom implementation because strstr is declared unsafe, and to handle switching between unicode and char.

TEXTCHAR *writable_string = StrDup( WIDE( "look in this string" ) );
TEXTCHAR *found = StrStr( writable_string, WIDE( "in" ) );
// returns a pointer to 'in' in the writable string, which can then be modified.
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!