add type of variables 'z' & StrAdd() & StrSub()
Posted: Sun Mar 19, 2017 10:20 am
add type of variables 'z' & StrAdd() & StrSub()
Structure z
size.l
s.s
EndStructure
.z must use Variable name
a.z="xxx" ,then a\size automate properly by pb own
@a=@a\s
StrAdd(Str$,"xxx",Position=-1) ,[-1=ending] ,if Str$ is ZString ,then ZStr$\size added automate
StrSub(Str$,SubtractSize,Position=-1)...
*************************
from
Fast string:
http://www.purebasic.fr/english/viewtop ... =3&t=58892
------------
pb every allocating Memory for new string ,or for update string.
so pb sure has size of string (as use own len()...)
so .s add size.l is compliant
so save size of string for use whenever ,this is properly
or .s add not size.l ,but add .z and add...:
(.z replace .BSTR)
Structure z
size.l
s.s
EndStructure
.z must use Variable name
a.z="xxx" ,then a\size automate properly by pb own
@a=@a\s
StrAdd(Str$,"xxx",Position=-1) ,[-1=ending] ,if Str$ is ZString ,then ZStr$\size added automate
StrSub(Str$,SubtractSize,Position=-1)...
*************************
from
Fast string:
http://www.purebasic.fr/english/viewtop ... =3&t=58892
------------
pb every allocating Memory for new string ,or for update string.
so pb sure has size of string (as use own len()...)
so .s add size.l is compliant
so save size of string for use whenever ,this is properly
or .s add not size.l ,but add .z and add...:
(.z replace .BSTR)