Quote:
Originally Posted by Frus
Can't you put a parameter in the function to specify the maximum length of the returned string?
|
How do you exactly do that? Sample code:
PHP Code:
String:DoSomething(maxlen) {
decl String:buffer[128]
new len = FormatEx(buffer,sizeof(buffer),"blabla")
if(len > maxlen) {
buffer[maxlen] = 0
}
return buffer
}
Wouldnt that still return the whole 128 byte array?
Quote:
Originally Posted by Frus
EDIT: grey, isn't that function returning a single character, not a string?
|
It returns the string.
__________________