PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/TODO

http://github.com/baryluk/cords
#! | 82 lines | 74 code | 8 blank | 0 comment | 0 complexity | b1c1624240c6bdfe9f1c2947573456e6 MD5 | raw file
 1Dodatkowe metody:
 2
 3Templates like this:
 4
 5   cord title = ...;
 6   cord author = ...;
 7   cord article = ...;
 8
 9   cord X = template(r"<html>
10   <head><title>{title}</title></head>
11     <body>
12       <h1>{header}</h1>
13       By {author}
14       <p>{article}</p>
15     </body>
16   </html>");
17
18   // - it will just merge constant nodes, and create call
19   //   to the concat of multiple cords
20   // - we should use templates similar to other programing templates
21   // - template should be static string or static file content (using mixin)
22   // - both static and dynamic templates should be possible
23   // - we can also support encoding of the fly (like changing characters into HTML entities)
24   // - one can also support expression templates, which will simplify switching, but will not be template
25
26From Python:
27 - cord c.py.swapcase()
28 - cord[] c.py.splitlines(bool keepends = false)
29 - cord[] c.py.split(uint maxsplit = -1) // split on whitespace
30 - cord[] c.py.split(cord|string sep, uint maxsplit = -1)
31 - cord[] c.py.rsplit(uint maxsplit = -1) // split on whitespace
32 - cord[] c.py.rsplit(cord|string sep, uint maxsplit = -1)
33 - [head,sep,tail] = cord[3] c.py.partition(cord|string sep)
34 - [tail,sep,head] = cord[3] c.py.rpartition(cord|string sep)
35 - cord c.py.center(uint width, char fillchar = ' ')
36 - cord c.py.ljust(uint width, char fillchar = ' ')
37 - cord c.py.rjust(uint width, char fillchar = ' ')
38 - uint c.py.count(cord|string sub)
39 - uint c.py.count(cord|string sub, uint start = 0, uint end = -1) // not really needed, as slicing is cheap
40 - cord c.py.lower()
41 - cord c.py.upper()
42 - cord c.py.title()
43 - cord c.py.islower()
44 - cord c.py.isupper()
45 - bool c.py.istitle()
46 - bool c.py.isdigit()
47 - bool c.py.isalpha()
48 - bool c.py.isalnum()
49 - bool c.py.isspace()
50 - cord c.py.capitalize()
51 - bool c.py.starswith(cord|string prefix, uint start = 0, uint end = -1)
52 - bool c.py.endswith(cord|string prefix, uint start = 0, uint end = -1)
53 - cord c.py.lstrip(string chars = " \t")
54 - cord c.py.rstrip(string chars = " \t")
55 - cord c.py.strip(string chars = " \t")
56 - cord c.py.expandtabs(uint tabsize = 8)
57 - cord c.py.zfill(uint width)
58 - int c.py.find(cord|string sub, uint start = 0, uint end = -1) // in python, returns -1 on failure.
59 - int c.py.rfind(cord|string sub, uint start = 0, uint end = -1)
60 - int c.py.index(cord|string sub, uint start = 0, uint end = -1) // same as find but throws exception on failure
61 - int c.py.rindex(cord|string sub, uint start = 0, uint end = -1)
62 - cord c.py.decode(string encoding, bool errors)
63 - cord c.py.encode(string encoding, bool errors)
64 - cord c.py.join(cord[] sequenced) // uses c as string in the middle
65 - cord c.py.replace(cord|string old, cord|string new, uint count = -1)
66 - cord c.py.translate(char[256] table, bool[char] deletchards = null)
67
68
69From Ruby:
70   %   *   +   <<   <=>   ==   =~   []   []=   block_scanf   capitalize   capitalize!
71   casecmp   center   chomp   chomp!   chop   chop   chop!   chop!   concat   count
72   crypt   delete   delete   delete!   delete!   downcase   downcase!   dump   each
73   each_byte   each_char   each_line   empty?   end_regexp   eql?   gsub   gsub!
74   hash   hex   include?   index   initialize_copy   insert   inspect   intern
75   iseuc   issjis   isutf8   jcount   jlength   jsize   kconv   length   ljust
76   lstrip   lstrip!   match   mbchar?   new   next   next!   oct   quote
77   replace   reverse   reverse!   rindex   rjust   rstrip   rstrip!   scan
78   scanf   size   slice   slice!   split   squeeze   squeeze   squeeze!   squeeze!
79   strip   strip!   sub   sub!   succ   succ   succ!   succ!   sum   swapcase   swapcase!
80   to_f   to_i   to_s   to_str   to_sym   toeuc   tojis   tosjis   toutf16   toutf8
81   tr   tr   tr!   tr!   tr_s   tr_s   tr_s!   tr_s!   unpack   upcase   upcase!   upto
82