Lines Matching refs:pAsciiStr
30 static sal_Bool ImplDbgCheckAsciiStr( const sal_Char* pAsciiStr, sal_Int32 nLen ) in ImplDbgCheckAsciiStr() argument
32 while ( nLen && *pAsciiStr ) in ImplDbgCheckAsciiStr()
34 if ( ((unsigned char)*pAsciiStr) > 127 ) in ImplDbgCheckAsciiStr()
36 ++pAsciiStr, in ImplDbgCheckAsciiStr()
175 UniString UniString::CreateFromAscii( const sal_Char* pAsciiStr ) in CreateFromAscii() argument
177 DBG_ASSERT( pAsciiStr, "UniString::CreateFromAscii() - pAsciiStr is NULL" ); in CreateFromAscii()
180 xub_StrLen nLen = ImplStringLen( pAsciiStr ); in CreateFromAscii()
185 ImplCopyAsciiStr( aTempStr.AllocBuffer( nLen ), pAsciiStr, nLen ); in CreateFromAscii()
192 UniString UniString::CreateFromAscii( const sal_Char* pAsciiStr, xub_StrLen nLen ) in CreateFromAscii() argument
194 DBG_ASSERT( pAsciiStr, "UniString::CreateFromAscii() - pAsciiStr is NULL" ); in CreateFromAscii()
198 nLen = ImplStringLen( pAsciiStr ); in CreateFromAscii()
204 ImplCopyAsciiStr( aTempStr.AllocBuffer( nLen ), pAsciiStr, nLen ); in CreateFromAscii()
211 UniString& UniString::AssignAscii( const sal_Char* pAsciiStr ) in AssignAscii() argument
214 DBG_ASSERT( pAsciiStr, "UniString::AssignAscii() - pAsciiStr is NULL" ); in AssignAscii()
217 xub_StrLen nLen = ImplStringLen( pAsciiStr ); in AssignAscii()
227 ImplCopyAsciiStr( mpData->maStr, pAsciiStr, nLen ); in AssignAscii()
235 ImplCopyAsciiStr( mpData->maStr, pAsciiStr, nLen ); in AssignAscii()
244 UniString& UniString::AssignAscii( const sal_Char* pAsciiStr, xub_StrLen nLen ) in AssignAscii() argument
247 DBG_ASSERT( pAsciiStr, "UniString::AssignAscii() - pAsciiStr is NULL" ); in AssignAscii()
250 nLen = ImplStringLen( pAsciiStr ); in AssignAscii()
257 if ( !pAsciiStr[i] ) in AssignAscii()
273 ImplCopyAsciiStr( mpData->maStr, pAsciiStr, nLen ); in AssignAscii()
281 ImplCopyAsciiStr( mpData->maStr, pAsciiStr, nLen ); in AssignAscii()
290 UniString& UniString::AppendAscii( const sal_Char* pAsciiStr ) in AppendAscii() argument
293 DBG_ASSERT( pAsciiStr, "UniString::AppendAscii() - pAsciiStr is NULL" ); in AppendAscii()
296 sal_Int32 nCopyLen = ImplStringLen( pAsciiStr ); in AppendAscii()
309 ImplCopyAsciiStr( pNewData->maStr+mpData->mnLen, pAsciiStr, nCopyLen ); in AppendAscii()
321 UniString& UniString::AppendAscii( const sal_Char* pAsciiStr, xub_StrLen nLen ) in AppendAscii() argument
324 DBG_ASSERT( pAsciiStr, "UniString::AppendAscii() - pAsciiStr is NULL" ); in AppendAscii()
327 nLen = ImplStringLen( pAsciiStr ); in AppendAscii()
334 if ( !pAsciiStr[i] ) in AppendAscii()
353 ImplCopyAsciiStr( pNewData->maStr+mpData->mnLen, pAsciiStr, nCopyLen ); in AppendAscii()
365 UniString& UniString::InsertAscii( const char* pAsciiStr, xub_StrLen nIndex ) in InsertAscii() argument
368 DBG_ASSERT( pAsciiStr, "UniString::InsertAscii() - pAsciiStr is NULL" ); in InsertAscii()
371 sal_Int32 nCopyLen = ImplStringLen( pAsciiStr ); in InsertAscii()
389 ImplCopyAsciiStr( pNewData->maStr+nIndex, pAsciiStr, nCopyLen ); in InsertAscii()
403 const sal_Char* pAsciiStr, xub_StrLen nStrLen ) in ReplaceAscii() argument
406 DBG_ASSERT( pAsciiStr, "UniString::ReplaceAscii() - pAsciiStr is NULL" ); in ReplaceAscii()
411 AppendAscii( pAsciiStr, nStrLen ); in ReplaceAscii()
418 AssignAscii( pAsciiStr, nStrLen ); in ReplaceAscii()
424 nStrLen = ImplStringLen( pAsciiStr ); in ReplaceAscii()
436 ImplCopyAsciiStr( mpData->maStr+nIndex, pAsciiStr, nStrLen ); in ReplaceAscii()
448 ImplCopyAsciiStr( pNewData->maStr+nIndex, pAsciiStr, n ); in ReplaceAscii()
461 StringCompare UniString::CompareToAscii( const sal_Char* pAsciiStr, in CompareToAscii() argument
465 DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, nLen ), in CompareToAscii()
469 sal_Int32 nCompare = ImplStringCompareAscii( mpData->maStr, pAsciiStr, nLen ); in CompareToAscii()
482 StringCompare UniString::CompareIgnoreCaseToAscii( const sal_Char* pAsciiStr, in CompareIgnoreCaseToAscii() argument
486 DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, nLen ), in CompareIgnoreCaseToAscii()
490 sal_Int32 nCompare = ImplStringICompareAscii( mpData->maStr, pAsciiStr, nLen ); in CompareIgnoreCaseToAscii()
503 sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr ) const in EqualsAscii()
506 DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ), in EqualsAscii()
509 return (ImplStringCompareAscii( mpData->maStr, pAsciiStr ) == 0); in EqualsAscii()
514 sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const in EqualsIgnoreCaseAscii()
517 DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ), in EqualsIgnoreCaseAscii()
520 return (ImplStringICompareAscii( mpData->maStr, pAsciiStr ) == 0); in EqualsIgnoreCaseAscii()
525 sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr, in EqualsAscii() argument
529 DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, nLen ), in EqualsAscii()
534 return (*pAsciiStr == 0); in EqualsAscii()
536 return (ImplStringCompareAscii( mpData->maStr+nIndex, pAsciiStr, nLen ) == 0); in EqualsAscii()
541 sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr, in EqualsIgnoreCaseAscii() argument
545 DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, nLen ), in EqualsIgnoreCaseAscii()
550 return (*pAsciiStr == 0); in EqualsIgnoreCaseAscii()
552 return (ImplStringICompareAscii( mpData->maStr+nIndex, pAsciiStr, nLen ) == 0); in EqualsIgnoreCaseAscii()
557 xub_StrLen UniString::SearchAscii( const sal_Char* pAsciiStr, xub_StrLen nIndex ) const in SearchAscii() argument
560 DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ), in SearchAscii()
564 xub_StrLen nStrLen = ImplStringLen( pAsciiStr ); in SearchAscii()
576 sal_Unicode cSearch = (unsigned char)*pAsciiStr; in SearchAscii()
591 if ( ImplStringCompareWithoutZeroAscii( pStr, pAsciiStr, nStrLen ) == 0 ) in SearchAscii()
603 xub_StrLen UniString::SearchAndReplaceAscii( const sal_Char* pAsciiStr, const UniString& rRepStr, in SearchAndReplaceAscii() argument
607 DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ), in SearchAndReplaceAscii()
610 xub_StrLen nSPos = SearchAscii( pAsciiStr, nIndex ); in SearchAndReplaceAscii()
612 Replace( nSPos, ImplStringLen( pAsciiStr ), rRepStr ); in SearchAndReplaceAscii()
619 void UniString::SearchAndReplaceAllAscii( const sal_Char* pAsciiStr, const UniString& rRepStr ) in SearchAndReplaceAllAscii() argument
622 DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ), in SearchAndReplaceAllAscii()
625 xub_StrLen nCharLen = ImplStringLen( pAsciiStr ); in SearchAndReplaceAllAscii()
626 xub_StrLen nSPos = SearchAscii( pAsciiStr, 0 ); in SearchAndReplaceAllAscii()
631 nSPos = SearchAscii( pAsciiStr, nSPos ); in SearchAndReplaceAllAscii()