本文整理汇总了C++中MyString::Text方法的典型用法代码示例。如果您正苦于以下问题:C++ MyString::Text方法的具体用法?C++ MyString::Text怎么用?C++ MyString::Text使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyString
的用法示例。
在下文中一共展示了MyString::Text方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetFExtOnly
//---------------------------------------------------------------------------
MyString MYRTLEXP GetFExtOnly( const MyString& nm, char Slash )
{ char *m = StrRChr( nm.Text(),Slash );
if ( !m ) m = nm.Text();
m = StrRChr( m,'.' );
if (m)
return MyString(m+1);
else
return MyString("");
}
示例2: StrDelStr
CONSTSTR MYRTLEXP StrDelStr( CONSTSTR str,CONSTSTR subStr,int pos )
{ CONSTSTR m = (str && subStr)?strstr(str+Min(pos,(int)strLen(str)),subStr):NULL;
resStrSCol = "";
if ( !m ) {
if (str) resStrSCol = str;
return resStrSCol.Text();
}
for ( ; *str && str != m; str++ ) resStrSCol.Add(*str);
for ( ; *str && *subStr; subStr++,str++ );
for ( ; *str; str++ ) resStrSCol.Add(*str);
return resStrSCol.Text();
}
示例3: GetFNameOnly
MyString MYRTLEXP GetFNameOnly( const MyString& nm, char Slash )
{ char str[ MAX_PATH_SIZE ];
char *m = StrRChr( nm.Text(),Slash );
if (!m) m = nm.Text(); else m++;
StrCpy( str,m,sizeof(str) );
m = StrRChr(str,'.');
if (m) *m = 0;
return MyString(str);
}
示例4: GetFName
//---------------------------------------------------------------------------
MyString MYRTLEXP GetFName( const MyString& nm, char Slash )
{ char *m = StrRChr( nm.Text(), Slash );
if (!m)
return MyString(nm);
else
return MyString(m+1);
}
示例5: GetFPath
//---------------------------------------------------------------------------
MyString MYRTLEXP GetFPath( const MyString& nm, char Slash )
{ char str[ MAX_PATH_SIZE ];
char *m;
StrCpy( str,nm.Text(),sizeof(str) );
m = StrRChr( str,Slash );
if (m) *m = 0; else str[0] = 0;
return MyString( AddLastSlash(str) );
}
示例6: StrGetCol
CONSTSTR MYRTLEXP StrGetCol( MyString& buff, CONSTSTR str,int number,CONSTSTR seps )
{ int res;
for ( res = 1; *str && res < number; str++ )
if ( StrChr(seps,*str) != NULL ) res++;
buff = "";
if ( res == number )
for( ; *str && StrChr(seps,*str) == NULL; str++ )
buff.Add(*str);
return buff.Text();
}
示例7: MakeFullPathName
MyString MYRTLEXP MakeFullPathName( const MyString& fname, const MyString& base )
{ MyString oldP,s;
if ( fname.Chr(SLASH_CHAR) == -1 ) {
s.Set( base );
s.Add( SLASH_CHAR );
s.Add( fname );
return s;
}
oldP = GetCurDir();
//Go base path
SetCurDir( base.Text() );
//Go fname path in case it relative
SetCurDir( FPath(fname.Text()) );
//Get result path + name
s.Set( GetCurDir() );
s.Add( FName(fname.Text()) );
SetCurDir( oldP.Text() );
return s;
}
示例8: PathCmp
BOOL MYRTLEXP PathCmp( const MyString& path,const MyString& path1 )
{
return CMP_FILE( path.Text(),path1.Text() );
}
示例9: BasePath
/***************************************
Procedures
***************************************/
BOOL MYRTLEXP BasePath( const MyString& base, const MyString& path )
{
return path.Length() >= base.Length() &&
CMPN_FILE( path.Text(),base.Text(),base.Length() );
}