Lines Matching defs:aSource

46 LossyCopyUTF16toASCII( const nsAString& aSource, nsACString& aDest )
49 LossyAppendUTF16toASCII(aSource, aDest);
54 CopyASCIItoUTF16( const nsACString& aSource, nsAString& aDest )
57 AppendASCIItoUTF16(aSource, aDest);
62 LossyCopyUTF16toASCII( const PRUnichar* aSource, nsACString& aDest )
65 if (aSource) {
66 LossyAppendUTF16toASCII(nsDependentString(aSource), aDest);
72 CopyASCIItoUTF16( const char* aSource, nsAString& aDest )
75 if (aSource) {
76 AppendASCIItoUTF16(nsDependentCString(aSource), aDest);
82 CopyUTF16toUTF8( const nsAString& aSource, nsACString& aDest )
85 AppendUTF16toUTF8(aSource, aDest);
90 CopyUTF8toUTF16( const nsACString& aSource, nsAString& aDest )
93 AppendUTF8toUTF16(aSource, aDest);
98 CopyUTF16toUTF8( const PRUnichar* aSource, nsACString& aDest )
101 AppendUTF16toUTF8(aSource, aDest);
106 CopyUTF8toUTF16( const char* aSource, nsAString& aDest )
109 AppendUTF8toUTF16(aSource, aDest);
114 LossyAppendUTF16toASCII( const nsAString& aSource, nsACString& aDest )
117 aDest.SetLength(old_dest_length + aSource.Length());
129 copy_string(aSource.BeginReading(fromBegin), aSource.EndReading(fromEnd), converter);
134 AppendASCIItoUTF16( const nsACString& aSource, nsAString& aDest )
137 aDest.SetLength(old_dest_length + aSource.Length());
149 copy_string(aSource.BeginReading(fromBegin), aSource.EndReading(fromEnd), converter);
154 LossyAppendUTF16toASCII( const PRUnichar* aSource, nsACString& aDest )
156 if (aSource) {
157 LossyAppendUTF16toASCII(nsDependentString(aSource), aDest);
163 AppendASCIItoUTF16( const char* aSource, nsAString& aDest )
165 if (aSource) {
166 AppendASCIItoUTF16(nsDependentCString(aSource), aDest);
172 AppendUTF16toUTF8( const nsAString& aSource, nsACString& aDest )
176 copy_string(aSource.BeginReading(source_start),
177 aSource.EndReading(source_end), calculator);
202 copy_string(aSource.BeginReading(source_start),
203 aSource.EndReading(source_end), converter);
220 NS_ConvertUTF16toUTF8(aSource));
227 AppendUTF8toUTF16( const nsACString& aSource, nsAString& aDest )
231 copy_string(aSource.BeginReading(source_start),
232 aSource.EndReading(source_end), calculator);
257 copy_string(aSource.BeginReading(source_start),
258 aSource.EndReading(source_end), converter);
274 NS_ConvertUTF8toUTF16(aSource));
281 AppendUTF16toUTF8( const PRUnichar* aSource, nsACString& aDest )
283 if (aSource) {
284 AppendUTF16toUTF8(nsDependentString(aSource), aDest);
290 AppendUTF8toUTF16( const char* aSource, nsAString& aDest )
292 if (aSource) {
293 AppendUTF8toUTF16(nsDependentCString(aSource), aDest);
301 * @param aSource an string you will eventually be making a copy of
308 AllocateStringCopy( const FromStringT& aSource, ToCharT* )
310 return NS_STATIC_CAST(ToCharT*, nsMemory::Alloc((aSource.Length()+1) * sizeof(ToCharT)));
316 ToNewCString( const nsAString& aSource )
318 char* result = AllocateStringCopy(aSource, (char*)0);
322 copy_string(aSource.BeginReading(fromBegin), aSource.EndReading(fromEnd), converter).write_terminator();
328 ToNewUTF8String( const nsAString& aSource, PRUint32 *aUTF8Count )
332 copy_string(aSource.BeginReading(start), aSource.EndReading(end),
342 copy_string(aSource.BeginReading(start), aSource.EndReading(end),
351 ToNewCString( const nsACString& aSource )
355 char* result = AllocateStringCopy(aSource, (char*)0);
359 *copy_string(aSource.BeginReading(fromBegin), aSource.EndReading(fromEnd), toBegin) = char(0);
365 ToNewUnicode( const nsAString& aSource )
369 PRUnichar* result = AllocateStringCopy(aSource, (PRUnichar*)0);
373 *copy_string(aSource.BeginReading(fromBegin), aSource.EndReading(fromEnd), toBegin) = PRUnichar(0);
379 ToNewUnicode( const nsACString& aSource )
381 PRUnichar* result = AllocateStringCopy(aSource, (PRUnichar*)0);
385 copy_string(aSource.BeginReading(fromBegin), aSource.EndReading(fromEnd), converter).write_terminator();
391 UTF8ToNewUnicode( const nsACString& aSource, PRUint32 *aUTF16Count )
395 copy_string(aSource.BeginReading(start), aSource.EndReading(end),
405 copy_string(aSource.BeginReading(start), aSource.EndReading(end),
414 CopyUnicodeTo( const nsAString& aSource, PRUint32 aSrcOffset, PRUnichar* aDest, PRUint32 aLength )
418 copy_string(aSource.BeginReading(fromBegin).advance( PRInt32(aSrcOffset) ), aSource.BeginReading(fromEnd).advance( PRInt32(aSrcOffset+aLength) ), toBegin);
617 write( const char* aSource, PRUint32 aSourceLength )
619 char* cp = NS_CONST_CAST(char*,aSource);
620 const char* end = aSource + aSourceLength;
663 write( const char* aSource, PRUint32 aSourceLength )
667 const char* end = aSource + len;
668 while (aSource != end) {
669 char ch = *aSource;
674 ++aSource;
687 ToUpperCase( const nsACString& aSource, nsACString& aDest )
691 aDest.SetLength(aSource.Length());
693 copy_string(aSource.BeginReading(fromBegin), aSource.EndReading(fromEnd), converter);
705 write( const char* aSource, PRUint32 aSourceLength )
707 char* cp = NS_CONST_CAST(char*,aSource);
708 const char* end = aSource + aSourceLength;
751 write( const char* aSource, PRUint32 aSourceLength )
755 const char* end = aSource + len;
756 while (aSource != end) {
757 char ch = *aSource;
762 ++aSource;
775 ToLowerCase( const nsACString& aSource, nsACString& aDest )
779 aDest.SetLength(aSource.Length());
781 copy_string(aSource.BeginReading(fromBegin), aSource.EndReading(fromEnd), converter);
1019 StringBeginsWith( const nsAString& aSource, const nsAString& aSubstring,
1022 nsAString::size_type src_len = aSource.Length(),
1026 return Substring(aSource, 0, sub_len).Equals(aSubstring, aComparator);
1030 StringBeginsWith( const nsACString& aSource, const nsACString& aSubstring,
1033 nsACString::size_type src_len = aSource.Length(),
1037 return Substring(aSource, 0, sub_len).Equals(aSubstring, aComparator);
1041 StringEndsWith( const nsAString& aSource, const nsAString& aSubstring,
1044 nsAString::size_type src_len = aSource.Length(),
1048 return Substring(aSource, src_len - sub_len, sub_len).Equals(aSubstring,
1053 StringEndsWith( const nsACString& aSource, const nsACString& aSubstring,
1056 nsACString::size_type src_len = aSource.Length(),
1060 return Substring(aSource, src_len - sub_len, sub_len).Equals(aSubstring,