Need to know the maximum allowable size for a string literal. We will be concatenating query results seperated by a delimiter to a string. This may be very very large. What is the maximum size of the string datatype if any?
I believe 255 bytes ---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee"alert(Nstr); }
ahhh.. I checked my reference and it states 1022 bytes ---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee"alert(Nstr); }
And I got a string length of 74 million and then 148 million (but it took quite a while to get the 148 - froze everything up.....) You should probably try to keep your string length below about 75 million characters or you could have some performance problems -----------------------------------------------------------------
"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
I didn't know that would make the page so wide - sorry guys.... -----------------------------------------------------------------
"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.