Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Little text functions
#1
Member function str.glue_strs
Code:
Copy      Help
function str'a str'b [str'separator]
;EXAMPLE:
;str a="a[]b[]c[]d[]e"
;str b="pru1[]pru2[]pru3[]pru4"
;str c.glue_strs(a b " - ")
;out c
ARRAY(str) aa(a) bb(b)
int l=iif(aa.len>bb.len aa.len bb.len)
ARRAY(str) t.create(l)
int i
for i 0 l
,t[i].from(aa[i] separator bb[i])
,err
,,t[i]=aa[i]
,,err
,,,t[i]=bb[i]
this=t


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)