See this topic: viewtopic.php?t=9194
After update http://www.purebasic.com/update/ from November 30th, the 64k limit is gone!
ReplaceString, RemoveString is working.
Code: Select all
;
; Procedure SetStringManipulationBufferSize(Bytes)
; PBStringBase.l = 0
; PBMemoryBase.l = 0
; !MOV eax, dword [PB_StringBase]
; !MOV [esp+4],eax
; !MOV eax, dword [PB_MemoryBase]
; !MOV [esp+8],eax
; HeapReAlloc_(PBMemoryBase, #GMEM_ZEROINIT, PBStringBase, Bytes)
; !MOV dword [_PB_StringBase],eax
; EndProcedure
;
; ; Set the buffer size for all strings to 1 MB.
; SetStringManipulationBufferSize(1048576)
A$ = Space(1000000)+"test"
; NO MORE CRASH 1 - ReplaceString()
A$ = ReplaceString(A$,"test","pure")
Debug Right(a$,4)
; NO MORE CRASH 2 - RemoveString()
A$ = RemoveString(A$,"pu")
Debug Right(A$,2)
Debug Len (A$)