Do you have an example of such code in Java? Gimme a link pls.
Posts made by rytrom
-
RE: Where is char-supporting String funcions!
-
RE: Where is char-supporting String funcions!
I'd blame his manager who allowed him to do this job. Or his manager's manager who allowed his manager to do it:-) Really WTF
-
RE: Where is char-supporting String funcions!
Re: Where is char-supporting String functions!
yeah, I meant the Unicode issue. It is Java:-) you wouldn't
believe but this is a part of a public API which they give to customers
(not source at least) but ALL the code is like this. Most of classes'
members are public and most of the functions as well. But they invented
a new method of incapsulation control. Some of the public functions
have in their doc clause a phrase "for internal use only!". WTF!!!
Souldn't there be a way to revoke a programmer's license???:-) -
Where is char-supporting String funcions!
Apparently guys wrote the following masterpiece barely didn't find a
function working with char type argument and then decided to write on
their own:
public int Find(String string,char x, int startPos) {
int i;
if (string.length() == 0)
return -1;
if (startPos >= string.length())
return -1;
byte[] byteArray = string.getBytes();
for (i = startPos; i < byteArray.length; i++)
if (byteArray[i] == x)
break;
if (i == byteArray.length)
return -1;
else
return i;
}
not talking that it's stupid it won't work for not-English words