Lines Matching refs:nLen
184 static STRINGDATA* ImplAllocData( sal_Int32 nLen ) in ImplAllocData() argument
187 STRINGDATA* pData = (STRINGDATA*)rtl_allocateMemory( sizeof(STRINGDATA)+(nLen*sizeof( STRCODE )) ); in ImplAllocData()
189 pData->mnLen = nLen; in ImplAllocData()
190 pData->maStr[nLen] = 0; in ImplAllocData()
268 STRING::STRING( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen ) in STRING() argument
276 nLen = 0; in STRING()
281 if ( nLen > nMaxLen ) in STRING()
282 nLen = static_cast< xub_StrLen >(nMaxLen); in STRING()
286 if ( nLen ) in STRING()
289 if ( (nPos == 0) && (nLen == rStr.mpData->mnLen) ) in STRING()
297 mpData = ImplAllocData( nLen ); in STRING()
298 memcpy( mpData->maStr, rStr.mpData->maStr+nPos, nLen*sizeof( STRCODE ) ); in STRING()
316 xub_StrLen nLen; in STRING() local
318 nLen = ImplStringLen( pCharStr ); in STRING()
320 nLen = 0; in STRING()
323 if ( nLen ) in STRING()
326 mpData = ImplAllocData( nLen ); in STRING()
327 memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); in STRING()
337 STRING::STRING( const STRCODE* pCharStr, xub_StrLen nLen ) in STRING() argument
343 if ( nLen == STRING_LEN ) in STRING()
344 nLen = ImplStringLen( pCharStr ); in STRING()
349 for ( xub_StrLen i = 0; i < nLen; i++ ) in STRING()
360 if ( nLen ) in STRING()
363 mpData = ImplAllocData( nLen ); in STRING()
364 memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); in STRING()
415 xub_StrLen nLen = ImplStringLen( pCharStr ); in Assign() local
417 if ( !nLen ) in Assign()
424 if ( (nLen == mpData->mnLen) && (mpData->mnRefCount == 1) ) in Assign()
425 memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); in Assign()
432 mpData = ImplAllocData( nLen ); in Assign()
433 memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); in Assign()
442 STRING& STRING::Assign( const STRCODE* pCharStr, xub_StrLen nLen ) in Assign() argument
447 if ( nLen == STRING_LEN ) in Assign()
448 nLen = ImplStringLen( pCharStr ); in Assign()
453 for ( xub_StrLen i = 0; i < nLen; i++ ) in Assign()
463 if ( !nLen ) in Assign()
470 if ( (nLen == mpData->mnLen) && (mpData->mnRefCount == 1) ) in Assign()
471 memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); in Assign()
478 mpData = ImplAllocData( nLen ); in Assign()
479 memcpy( mpData->maStr, pCharStr, nLen*sizeof( STRCODE ) ); in Assign()
508 sal_Int32 nLen = mpData->mnLen; in Append() local
509 if ( !nLen ) in Append()
518 sal_Int32 nCopyLen = ImplGetCopyLen( nLen, rStr.mpData->mnLen ); in Append()
524 STRINGDATA* pNewData = ImplAllocData( nLen+nCopyLen ); in Append()
527 memcpy( pNewData->maStr, mpData->maStr, nLen*sizeof( STRCODE ) ); in Append()
528 memcpy( pNewData->maStr+nLen, rStr.mpData->maStr, nCopyLen*sizeof( STRCODE ) ); in Append()
547 sal_Int32 nLen = mpData->mnLen; in Append() local
551 nCopyLen = ImplGetCopyLen( nLen, nCopyLen ); in Append()
557 STRINGDATA* pNewData = ImplAllocData( nLen+nCopyLen ); in Append()
560 memcpy( pNewData->maStr, mpData->maStr, nLen*sizeof( STRCODE ) ); in Append()
561 memcpy( pNewData->maStr+nLen, pCharStr, nCopyLen*sizeof( STRCODE ) ); in Append()
595 sal_Int32 nLen = mpData->mnLen; in Append() local
596 sal_Int32 nCopyLen = ImplGetCopyLen( nLen, nCharLen ); in Append()
602 STRINGDATA* pNewData = ImplAllocData( nLen+nCopyLen ); in Append()
605 memcpy( pNewData->maStr, mpData->maStr, nLen*sizeof( STRCODE ) ); in Append()
606 memcpy( pNewData->maStr+nLen, pCharStr, nCopyLen*sizeof( STRCODE ) ); in Append()
623 sal_Int32 nLen = mpData->mnLen; in Append() local
624 if ( c && (nLen < STRING_MAXLEN) ) in Append()
627 STRINGDATA* pNewData = ImplAllocData( nLen+1 ); in Append()
630 memcpy( pNewData->maStr, mpData->maStr, nLen*sizeof( STRCODE ) ); in Append()
631 pNewData->maStr[nLen] = c; in Append()
689 STRING& STRING::Insert( const STRING& rStr, xub_StrLen nPos, xub_StrLen nLen, in Insert() argument
697 nLen = 0; in Insert()
702 if ( nLen > nMaxLen ) in Insert()
703 nLen = static_cast< xub_StrLen >(nMaxLen); in Insert()
707 sal_Int32 nCopyLen = ImplGetCopyLen( mpData->mnLen, nLen ); in Insert()
937 sal_Int32 nLen = mpData->mnLen; in Expand() local
938 if ( nCount <= nLen ) in Expand()
945 memcpy( pNewData->maStr, mpData->maStr, nLen*sizeof( STRCODE ) ); in Expand()
949 pStr += nLen; in Expand()
950 for (sal_Int32 i = nCount - nLen; i > 0; --i) { in Expand()
1088 sal_Int32 nLen = mpData->mnLen; in ToLowerAscii() local
1090 while ( nIndex < nLen ) in ToLowerAscii()
1114 sal_Int32 nLen = mpData->mnLen; in ToUpperAscii() local
1116 while ( nIndex < nLen ) in ToUpperAscii()
1143 xub_StrLen nLen = 0; // Ziel-Laenge in ConvertLineEnd() local
1151 if( nLen <= STRING_MAXLEN - nLineEndLen ) in ConvertLineEnd()
1152 nLen = nLen + nLineEndLen; in ConvertLineEnd()
1154 nLen = STRING_MAXLEN; in ConvertLineEnd()
1176 if( nLen < STRING_MAXLEN ) in ConvertLineEnd()
1177 ++nLen; in ConvertLineEnd()
1182 if ( nLen >= STRING_MAXLEN ) in ConvertLineEnd()
1190 STRINGDATA* pNewData = ImplAllocData( nLen ); in ConvertLineEnd()
1236 StringCompare STRING::CompareTo( const STRING& rStr, xub_StrLen nLen ) const in CompareTo()
1246 if ( mpData->mnLen < nLen ) in CompareTo()
1247 nLen = static_cast< xub_StrLen >(mpData->mnLen+1); in CompareTo()
1248 if ( rStr.mpData->mnLen < nLen ) in CompareTo()
1249 nLen = static_cast< xub_StrLen >(rStr.mpData->mnLen+1); in CompareTo()
1252 sal_Int32 nCompare = ImplStringCompareWithoutZero( mpData->maStr, rStr.mpData->maStr, nLen ); in CompareTo()
1265 StringCompare STRING::CompareTo( const STRCODE* pCharStr, xub_StrLen nLen ) const in CompareTo()
1270 sal_Int32 nCompare = ImplStringCompare( mpData->maStr, pCharStr, nLen ); in CompareTo()
1284 xub_StrLen nLen ) const in CompareIgnoreCaseToAscii()
1294 if ( mpData->mnLen < nLen ) in CompareIgnoreCaseToAscii()
1295 nLen = static_cast< xub_StrLen >(mpData->mnLen+1); in CompareIgnoreCaseToAscii()
1296 if ( rStr.mpData->mnLen < nLen ) in CompareIgnoreCaseToAscii()
1297 nLen = static_cast< xub_StrLen >(rStr.mpData->mnLen+1); in CompareIgnoreCaseToAscii()
1300 sal_Int32 nCompare = ImplStringICompareWithoutZero( mpData->maStr, rStr.mpData->maStr, nLen ); in CompareIgnoreCaseToAscii()
1314 xub_StrLen nLen ) const in CompareIgnoreCaseToAscii()
1319 sal_Int32 nCompare = ImplStringICompare( mpData->maStr, pCharStr, nLen ); in CompareIgnoreCaseToAscii()
1388 sal_Bool STRING::Equals( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const in Equals()
1397 if ( nMaxLen < nLen ) in Equals()
1401 nLen = static_cast< xub_StrLen >(nMaxLen); in Equals()
1405 return (ImplStringCompareWithoutZero( mpData->maStr+nIndex, rStr.mpData->maStr, nLen ) == 0); in Equals()
1410 sal_Bool STRING::Equals( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const in Equals()
1418 return (ImplStringCompare( mpData->maStr+nIndex, pCharStr, nLen ) == 0); in Equals()
1423 sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) co… in EqualsIgnoreCaseAscii()
1432 if ( nMaxLen < nLen ) in EqualsIgnoreCaseAscii()
1436 nLen = static_cast< xub_StrLen >(nMaxLen); in EqualsIgnoreCaseAscii()
1440 return (ImplStringICompareWithoutZero( mpData->maStr+nIndex, rStr.mpData->maStr, nLen ) == 0); in EqualsIgnoreCaseAscii()
1445 sal_Bool STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen… in EqualsIgnoreCaseAscii()
1453 return (ImplStringICompare( mpData->maStr+nIndex, pCharStr, nLen ) == 0); in EqualsIgnoreCaseAscii()
1516 sal_Int32 nLen = mpData->mnLen; in Search() local
1519 while ( nIndex < nLen ) in Search()
1537 sal_Int32 nLen = mpData->mnLen; in Search() local
1542 if ( !nStrLen || (nIndex >= nLen) ) in Search()
1551 while ( nIndex < nLen ) in Search()
1564 while ( nLen - nIndex >= nStrLen ) in Search()
1583 sal_Int32 nLen = mpData->mnLen; in Search() local
1588 if ( !nStrLen || (nIndex >= nLen) ) in Search()
1597 while ( nIndex < nLen ) in Search()
1608 while ( nLen - nIndex >= nStrLen ) in Search()
1650 sal_Int32 nLen = mpData->mnLen; in SearchChar() local
1653 while ( nIndex < nLen ) in SearchChar()
1706 sal_Int32 nLen = mpData->mnLen; in SearchAndReplace() local
1709 while ( nIndex < nLen ) in SearchAndReplace()
1761 sal_Int32 nLen = mpData->mnLen; in SearchAndReplaceAll() local
1764 while ( nIndex < nLen ) in SearchAndReplaceAll()
1821 sal_Int32 nLen = mpData->mnLen; in GetTokenCount() local
1824 while ( nIndex < nLen ) in GetTokenCount()
1845 xub_StrLen nLen = (xub_StrLen)mpData->mnLen; in SetToken() local
1852 while ( i < nLen ) in SetToken()
1883 xub_StrLen nLen = (xub_StrLen)mpData->mnLen; in GetToken() local
1890 while ( i < nLen ) in GetToken()
1912 if ( i < nLen ) in GetToken()
1939 sal_Int32 nLen = mpData->mnLen; in GetQuotedTokenCount() local
1945 while ( nIndex < nLen ) in GetQuotedTokenCount()
1995 xub_StrLen nLen = (xub_StrLen)mpData->mnLen; in GetQuotedToken() local
2002 while ( i < nLen ) in GetQuotedToken()
2047 if ( i < nLen ) in GetQuotedToken()
2076 void STRING::ReleaseBufferAccess( xub_StrLen nLen ) in ReleaseBufferAccess() argument
2082 if ( nLen > mpData->mnLen ) in ReleaseBufferAccess()
2083 nLen = ImplStringLen( mpData->maStr ); in ReleaseBufferAccess()
2084 OSL_ASSERT(nLen <= mpData->mnLen); in ReleaseBufferAccess()
2085 if ( !nLen ) in ReleaseBufferAccess()
2090 else if ( mpData->mnLen - nLen > 8 ) in ReleaseBufferAccess()
2092 STRINGDATA* pNewData = ImplAllocData( nLen ); in ReleaseBufferAccess()
2093 memcpy( pNewData->maStr, mpData->maStr, nLen*sizeof( STRCODE ) ); in ReleaseBufferAccess()
2098 mpData->mnLen = nLen; in ReleaseBufferAccess()
2103 STRCODE* STRING::AllocBuffer( xub_StrLen nLen ) in AllocBuffer() argument
2108 if ( nLen ) in AllocBuffer()
2109 mpData = ImplAllocData( nLen ); in AllocBuffer()