Advertisement
lord_thekenny

linqtable - help

Nov 11th, 2021
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. linqtable add methode for manipulate table
  2.  
  3. Functions in the linqtable:
  4.  
  5. Constructor
  6. - new(table) : create new linqtable for table in param
  7.  
  8. add
  9. - add(item) : add item in table
  10. - addToIndex(item, index) : add item in table at a index
  11. - concat(table) : concat seft with table in param
  12.  
  13. remove
  14. - removeLast() : remove last item in table
  15. - removeToIndex(index) : remove item at index in table
  16.  
  17. utility
  18. - length() : return the number of items in table
  19. - tostring() : return a string of all item in table
  20.  
  21. linq
  22. - forEach(lambda) : for all item exec the lambda(value,key):nil
  23. - select(lambda) : return linqtable of T define by lambda(value):T
  24. - where(lambda) : return filtred linqtable by lambda(value):boolean
  25. - first(lambda) : return lambda(value):T and return linqtable of T
  26. - sort(lambda) : return linqtable sort by lambda(item1,item2): 1,0,-1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement