Guest User

Untitled

a guest
Jan 15th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. int n=0
  2. Column c
  3. Object o
  4. Module m
  5. Buffer b = create
  6. for o in document m do {
  7. b = text(column 0, o) text(column 1,o) text(column 2,o)
  8. string s = stringOf b
  9. string sub ="XXX"
  10. if (findPlainText(s, sub, offset, len, true)) { n += 1 }
  11. }
  12. print n
  13.  
  14. Buffer buf = create()
  15. buf = "abc 123 abc 987 abc"
  16. int index = 0
  17. while(true)
  18. {
  19. index = contains(buf, "abc", index)
  20. if(0 <= index)
  21. {
  22. print index "n"
  23. index += length("abc")
  24. }
  25. else { print "stopn" ; break }
  26. }
  27. delete(buf)
  28.  
  29. 0
  30. 8
  31. 16
  32. stop
Add Comment
Please, Sign In to add comment