示例#1
0
void test_debug()
{
	CUString t= "ab안녕하세요cd";
	printf( "%s\n", t.GetStr() );
	printf( "%d\n", t.GetLength() );
	printf( "%d\n", t.GetCharLength() );

	CUString str_org = "adk안녕하세요zzz";
	CUString str = str_org.GetChar(-2);
	printf( "[%s]\n", str.GetStr() );


	CUString str_org2 = "adk안녕하세요zzz";
	CUString str2 = str_org2.GetChars(-2,2);
	printf( "[%s]\n", str2.GetStr() );

	CUString str_org3 = "adk안녕하세요zzz";
	int diff = str_org3.DeleteChars(3,400);
	printf( "[%s]%d\n", str_org3.GetStr(), diff );

	CUString rev_test = "abcd1a234";
	int find = rev_test.ReverseFind( '4' );
	printf( "[%s]%d\n", rev_test.GetStr(), find );

	str = "a   b";
	str.Replace( "  ", "  " );
	printf( "%s\n", str.GetStr() );
}
示例#2
0
void test_replace()
{
	printf( ">>>>>>>>> Replace 테스트\n" );
	CUString str;
	str = "hello this is my ... ";
	int num = str.Replace( "...", "" );
	str.Print( stderr );
	fprintf( stderr, "%s[%d]\n",str.GetStr(), num );
	printf( "\n" );
}
示例#3
0
void replace_test()
{
	CUString str;
	str = "hello this is my ... ";
	str = "abababab___";
	int num = str.Replace( "aba", "$" );
	str.Print( stderr );
	fprintf( stderr, "%s[%d]\n",str.GetStr(), num );

}