Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Little text functions
#2
Member function str.getmultiline
Code:
Copy      Help
function str'a pos [nc]
int nc1=nc
if(!nc) nc1=a.len
ARRAY(str) b(a)
int i
for i 0 b.len
,b[i].get(b[i] pos nc1)
this=b
this.trim


Member function str.leftmultiline
Code:
Copy      Help
function str'a nc
ARRAY(str) b(a)
int i
for i 0 b.len
,b[i].left(b[i] nc)
this=b
this.trim


Member function str.rightmultiline
Code:
Copy      Help
function str'a nc
ARRAY(str) b(a)
int i
for i 0 b.len
,b[i].right(b[i] nc)
this=b
this.trim


Member function str.insertmultiline
Code:
Copy      Help
function str'a from;; if from<0 add.
ARRAY(str) b(this)
int i
for i 0 b.len
,if(from<0) b[i].insert(a b[i].len)
,else b[i].insert(a from)
this=b
this.trim

note: everyone can add your own ...


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)