173 Commits

Author SHA1 Message Date
henry.jia%sun.com
c700eee56c Patch for Bug 75081: nsCString::FindChar is stupid. Extremely stupid
Patch by bratell@lysator.liu.se
r=jag, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@127237 18797224-902f-48f8-a5cc-f745e15eee43
2002-08-14 04:13:38 +00:00
bzbarsky%mit.edu
48b10a682c Change ToInteger to not silently drop '+' and '#' in mid-string. Bug
54142, r=timeless, sr=jag


git-svn-id: svn://10.0.0.236/trunk@123754 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-21 02:22:48 +00:00
timeless%mac.com
9ab5ff7ba7 Bug 136756 http://bugzilla.mozilla.org/show_bug.cgi?id=136756#c29
from the book of this can't be good by leaf

bonsai answer's leaf's question thusly:
No files matched this file name. It may have been added recently.
it does indicate that a file by the correct spelling exists...


git-svn-id: svn://10.0.0.236/trunk@121594 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-16 03:26:40 +00:00
dougt%netscape.com
d6cc711878 Fixes mozilla/strings requiring unfrozen nsCRT class. patch by scc, r=dougt, sr=jag, b=136756
git-svn-id: svn://10.0.0.236/trunk@121534 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 18:55:21 +00:00
alecf%netscape.com
61312b4eeb fix bug 139633 - as a part of freezing nsAString, move Left/Right/Mid back into nsString, and fix consumers to start using Substring()
r=jag, sr=darin


git-svn-id: svn://10.0.0.236/trunk@120220 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-29 20:29:54 +00:00
dbaron%fas.harvard.edu
772b5b8c58 Convert users of nsAReadable[C]String and nsAWritable[C]String typedefs to [const] nsA[C]String. b=131899 r=scc sr=jag a=asa
git-svn-id: svn://10.0.0.236/trunk@117354 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-24 00:16:18 +00:00
alecf%netscape.com
8755908f04 bug 127091 - big string cleanup, removing old APIs
- removing Assign/AppendWithConversion for single-characters
- removing unused StripChars
- removing ReplaceChar[s] for non-matching chars
- removing CompressSet
- removing nsCString::Find/FindCharInSet/RFind for unichar strings
- removing lots of EqualsWithConversion
r=dp, sr=jag
a=asa


git-svn-id: svn://10.0.0.236/trunk@115750 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-04 23:18:21 +00:00
cathleen%netscape.com
6f09324ed7 eliminate nsCRT::strlen for char* strings (part 4), bug 124536 r=dp sr=brendan
git-svn-id: svn://10.0.0.236/trunk@114939 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-19 16:01:45 +00:00
alecf%netscape.com
5a78793da8 re-land fix for bug 107575, moving nsStr static routines into a private class/namespace
git-svn-id: svn://10.0.0.236/trunk@114538 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-14 23:23:55 +00:00
alecf%netscape.com
a959243ac9 oops, back myself out - forward declared enums don't work on linux!
git-svn-id: svn://10.0.0.236/trunk@114534 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-14 23:14:50 +00:00
alecf%netscape.com
6326ee9424 make all static nsStr:: members private, so they are not exported, and so the linker can cull them out
r=dbaron, sr=blake, jag
bug 125093


git-svn-id: svn://10.0.0.236/trunk@114533 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-14 23:08:38 +00:00
alecf%netscape.com
f7ee18f044 one more part of fix for bug 107575, including the much coveted whitespace
remove aIgnoreCase parameter from all nsString and nsCString consumers
sr=jag, r=shaver


git-svn-id: svn://10.0.0.236/trunk@113390 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-01 01:53:09 +00:00
alecf%netscape.com
4331ed65d3 First part of fix for bug 107575 - remove nsString::FindChar because there is already an nsAString::FindChar, and remove the "ignore case" option in RFindChar
r=dougt, sr=jag


git-svn-id: svn://10.0.0.236/trunk@113200 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 06:04:29 +00:00
alecf%netscape.com
ce5f992cb4 bug 108962 - shrink nsStr by 4 bytes by packing mCharSize and mOwnsBuffer into bits of mCapacity
r=dbaron, sr=jst, with an almost-sr=jag


git-svn-id: svn://10.0.0.236/trunk@112769 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 23:46:56 +00:00
alecf%netscape.com
0885d07bf5 fix for bug 114450 - be explicit about string comparison w.r.t. character size - no more hand-rolled vtables!
sr=jag, r=dbaron


git-svn-id: svn://10.0.0.236/trunk@112713 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 19:14:18 +00:00
alecf%netscape.com
bfe2c85e5b factor out some table-based string manipulation routines to make it easier to seperate unicode vs. 8-bit character strings. bug 114450, r=dbaron sr=jag
git-svn-id: svn://10.0.0.236/trunk@112213 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-15 22:57:29 +00:00
alecf%netscape.com
d07f537d7f bug 114450 sr=jag
remove table-based comparison functions so we can actually remove them later


git-svn-id: svn://10.0.0.236/trunk@111630 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-09 02:28:28 +00:00
jaggernaut%netscape.com
9f55bebd67 Bug 113228: Remove To{Lower,Upper}Case from ns{C}String. r=bzbarsky, sr=jst
git-svn-id: svn://10.0.0.236/trunk@111413 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-05 11:18:57 +00:00
jaggernaut%netscape.com
6f56f8ad09 Bug 103342, 113590: ns{C}String::SubstituteString hangs/crashes. r=dbaron, sr=alecf
git-svn-id: svn://10.0.0.236/trunk@111271 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-02 23:54:25 +00:00
jaggernaut%netscape.com
21218c3fcb Add assertion to ns{C}String::Adopt. r=/sr=mozbot
git-svn-id: svn://10.0.0.236/trunk@111232 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-02 09:00:02 +00:00
jaggernaut%netscape.com
fa464ed171 Bug 116957: Put Adopt on ns{C}String, and use it in nsStandardURL. r=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@111092 18797224-902f-48f8-a5cc-f745e15eee43
2001-12-26 23:14:12 +00:00
jaggernaut%netscape.com
357c78f88e BUg 113228: Replace nsC?String::To(Lower|Upper)Case with global To(Lower|Upper)Case. r=dbaron, sr=jst
git-svn-id: svn://10.0.0.236/trunk@110075 18797224-902f-48f8-a5cc-f745e15eee43
2001-12-08 07:08:38 +00:00
alecf%netscape.com
71dee0899c fix for bug 108597 - move mOwnsBuffer and mCharSize into smaller variables to reduce nsStr's overall size
r=jag, sr=waterson


git-svn-id: svn://10.0.0.236/trunk@107478 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 22:50:13 +00:00
dbaron%fas.harvard.edu
f2bb49a853 Remove overloaded fputs functions, DebugDump, and (from nsCString only) ToCString). b=104763 r=jag rs=scc
git-svn-id: svn://10.0.0.236/trunk@105469 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-16 05:35:38 +00:00
dbaron%fas.harvard.edu
1382ac90eb Making debugging code be |#ifdef DEBUG|. b=91036 r=harishd sr=jst
git-svn-id: svn://10.0.0.236/trunk@105468 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-16 05:31:36 +00:00
jaggernaut%netscape.com
34e006d3a5 Remove dead code from obsolete string classes: ToNewString(), IsUnicode() and GetBuffer(). r=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@105387 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-14 05:06:53 +00:00
jaggernaut%netscape.com
51e0dc7a6c Bug 100476: Convert uses of member functions ToNewUnicode, ToNewCString and ToNewUTF8String to their global versions and remove support from nsCString and nsString. r=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@104212 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 08:28:41 +00:00
gerv%gerv.net
13afb6d0f9 Relicensing Round 1, Take 2. Most C-like NPL files -> NPL/GPL/LGPL. Bug 98089.
git-svn-id: svn://10.0.0.236/trunk@104119 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 20:14:13 +00:00
jaggernaut%netscape.com
5938d73d86 Bug 100750: string iterator users should use correct typedefs. r=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@103709 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 09:35:50 +00:00
jaggernaut%netscape.com
234588f481 Bug 98153: Remove SubsumeStr. r=dbaron, sr=scc
git-svn-id: svn://10.0.0.236/trunk@102292 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 10:46:45 +00:00
jaggernaut%netscape.com
51b17b5bf0 Bug 88413: Remove |GetUnicode()| from nsString (and replace it with |get()|). r=dbaron, rs=scc.
This removes all call-sites I can currently fix. Tomorrow I'll try to get someone to checkin my changes to security/ and I'll get some help with the Netscape side of things.

nsString::GetUnicode()'s final death-blow will be dealt soon. Please keep this in mind as you add new code :-)


git-svn-id: svn://10.0.0.236/trunk@98363 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-30 11:02:25 +00:00
scc%mozilla.org
7abd9ae877 bug #78658: checking in Chris Seawoods trivial fix to prevent writing to the console in optimized builds, sr=scc (myself)
git-svn-id: svn://10.0.0.236/trunk@94159 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-07 23:36:59 +00:00
scc%mozilla.org
7b06841b03 landing string branch; see bug #73786
git-svn-id: svn://10.0.0.236/trunk@91049 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-02 19:40:52 +00:00
disttsc%bart.nl
a863c06732 Move nsCString from |operator char*()| to |get()| and |NS_CONST_CAST| where needed. bug=53057, r=dmose, sr=shaver
git-svn-id: svn://10.0.0.236/trunk@89879 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-20 05:37:56 +00:00
scc%mozilla.org
3f930de8f0 bug #65219: (work done by dbaron) r=jag, sr=scc. Remove leaking string recyclers.
git-svn-id: svn://10.0.0.236/trunk@87754 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-23 02:03:02 +00:00
scc%mozilla.org
fe019074bb bug #53067: r=danm, sr=alecf. Eliminate copying versions of |BeginReading|, |EndReading|, |BeginWriting|, |EndWriting|, and fix callers
git-svn-id: svn://10.0.0.236/trunk@86364 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-06 23:18:20 +00:00
scc%mozilla.org
028f9f3180 bug #53071: r=danm, sr=alecf. Eliminate redundant implemenations, resolve resulting ambiguities.
git-svn-id: svn://10.0.0.236/trunk@86357 18797224-902f-48f8-a5cc-f745e15eee43
2001-02-06 23:07:24 +00:00
disttsc%bart.nl
62d90be0d3 Add |.get()| to nsCString. Bug=58284,r=dbaron, a=scc.
git-svn-id: svn://10.0.0.236/trunk@84035 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-23 06:45:54 +00:00
vidur%netscape.com
3e62b3f9f3 Changes to parser to allow less copying. Use of the new nsSliding[Sub]String classes so that tokens can hold substrings that keep references into the scanner buffer. Cleaned up token interface and general string usage. r=harishd,heikki sr=jst
git-svn-id: svn://10.0.0.236/trunk@83553 18797224-902f-48f8-a5cc-f745e15eee43
2000-12-12 21:58:14 +00:00
warren%netscape.com
a8b9664a8c Bug 47207. Backing out logging/PRINTF changes until we can fix stopwatch.h, introduce double parens, etc.
git-svn-id: svn://10.0.0.236/trunk@81967 18797224-902f-48f8-a5cc-f745e15eee43
2000-10-28 22:17:53 +00:00
warren%netscape.com
c6b67eceeb Bug 47207. Changing printf to PRINTF to use new logging facility. r=valeski,sr=waterson
git-svn-id: svn://10.0.0.236/trunk@81885 18797224-902f-48f8-a5cc-f745e15eee43
2000-10-27 22:43:51 +00:00
scc%mozilla.org
9fc340d07f making all string construction explicit; plus (now that the DOM APIs are turned on and you can no longer build without NEW_STRING_APIS) chopping out |#ifdef|ed code
git-svn-id: svn://10.0.0.236/trunk@78027 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-02 20:53:31 +00:00
jst%netscape.com
7e0575bfee DOM string changes. All nsString& in DOM interfaces (and interfaces needed by DOM implementations) have been changed to nsAReadableString& and nsAWritableString&. String implementation additions (sanctioned by scc) to support DOM needs. Bug 49091. r=vidur,jst,scc
git-svn-id: svn://10.0.0.236/trunk@76967 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-23 17:27:06 +00:00
waterson%netscape.com
0422415aad Fix nsCString::AppendWithConversion() to work.
git-svn-id: svn://10.0.0.236/trunk@76760 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-20 20:41:31 +00:00
scc%mozilla.org
b286b36f72 adding |AppendWithConverison(const PRUnichar*, PRInt32)|, the need for which was brought out by making constructors |explicit|
git-svn-id: svn://10.0.0.236/trunk@76711 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-19 19:34:00 +00:00
scc%mozilla.org
cdb44d875e better comments re: the formal specification of |SetCapacity|; jag's |ToInteger| patch as per bug #46898; r|a=waterson
git-svn-id: svn://10.0.0.236/trunk@75880 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-09 08:26:23 +00:00
scc%mozilla.org
6ef6f1fd36 fixes for bugs #46898 and #46899: bad behavior in |nsCString::ToInteger| and a feature request for |ns[C]String::SetCapacity(0)| respectively. r={harishd, waterson}, a=waterson
git-svn-id: svn://10.0.0.236/trunk@75144 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-29 03:11:59 +00:00
bratell%lysator.liu.se
30ea99bee8 Bug 40027, reads past buffer in nsString::ToCString, r,a=waterson
git-svn-id: svn://10.0.0.236/trunk@74784 18797224-902f-48f8-a5cc-f745e15eee43
2000-07-26 00:05:55 +00:00
waterson%netscape.com
e32e7767b4 Bug 42836. Handle null string in NS_ConvertUCS2toUTF8::Init().
git-svn-id: svn://10.0.0.236/trunk@72465 18797224-902f-48f8-a5cc-f745e15eee43
2000-06-17 01:24:39 +00:00
waterson%netscape.com
9d914a6568 Fix bonehead error warren found: don't re-initialize utf8len; we'll need it to set the string's length!
git-svn-id: svn://10.0.0.236/trunk@71816 18797224-902f-48f8-a5cc-f745e15eee43
2000-06-08 23:07:15 +00:00