string length can not more than 15k
var s = ""
loop:
s += temp_str
temp_str's length more than 15360 then print s,you can not get full string,and then you can get a string from s[0] to s[15360-1]
e.g. when I want to push a JSON file(the size more than 500K) from server to client(code by godot),the client can not get full file.
var s = ""
for i in range(20000):
s+="a"
print("s.length: ", s.length())
Shows 20000 correctly.
Is it possible that your temp_str been truncated before loop?
I received string from socket. var s = ""
func _process(): var output = socket.get_partial_data(1024) var outputData = output[1] var temp_str = outputData.get_string_from_utf8() s += temp_str
then I sent a long string from server to client. and I print it .but I can not see all of them.now ,I : print (s.right(s.length()-100)) then got the substr. so .I think the console can not show all. but the string not have this issue.
thank you!!! marynate!
new message:
if print (s.right(s.length()-16380)) I can got the string in console(cmd). if print (s.right(s.length()-16381)) I can not got the string in console(cmd). in the output of godot ,it displayed.but I can not confirm it's a full string,because the output of godot not have a scroll bar. and some minutes later, the console output a string "lost ?".
It seems to me that's the buffer size of windows console not big enough to hold output string.
I think u r right!