Wiki

Changes between Version 1 and Version 2 of StandardLibraryExtensionMethods

Show
Ignore:
Timestamp:
02/04/09 04:02:13 (15 years ago)
Author:
Chuck
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • StandardLibraryExtensionMethods

    v1 v2  
    1111#!python 
    1212namespace Cobra.Lang 
     13 
     14        extend System.Object 
     15 
     16                def toTechString as String 
     17 
     18                def toPrintString as String 
     19 
     20 
     21        extend String 
     22         
     23                def split(chars as List<of char>) as List<of String> 
     24                        test 
     25                                s = 'a,b:c:d,e,f' 
     26                                assert s.split([c',', c':']) == ['a', 'b', 'c', 'd', 'e', 'f'] 
     27         
     28                def split(chars as IList<of char>) as List<of String> 
    1329 
    1430        extend System.Collections.IList 
     
    2541 
    2642namespace Cobra.Lang 
     43 
     44        extend IEnumerable<of T> 
     45 
     46                def toList as List<of T> 
     47                        return List<of T>(this) 
    2748 
    2849        extend IList<of T>