Readstring()

BlitzMax Forums/BlitzMax Beginners Area/Readstring()

Sorry for not reading your original post more carefully.

Surely theres a way to simply read a string from a file without knowing its actual length!!! if not im gonna be real dissapointed with bmax!


As discussed in the other thread you just need to roll your own StringIO functions that perform the same as b3d:
Function ReadBBString$(stream:TStream)
	Local bytes=stream.ReadInt()
	If bytes Return stream.ReadString(bytes)
End Function

Function WriteBBString(stream:TStream,text$)
	stream.WriteInt text.length
	stream.WriteString text
End Function