Changeset 19

Show
Ignore:
Timestamp:
05/19/11 00:12:37 (1 year ago)
Author:
JoeCoder
Message:

Updates to keep pace with D2.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cdc.d

    r18 r19  
    157157} else 
    158158{   import std.date; 
    159     import std.string : join, find, replace, tolower; 
     159    version (D_Version2) 
     160        import std.string : join, indexOf, replace, tolower; 
     161    else 
     162        import std.string : join, find, replace, tolower; 
    160163    import std.stdio : writefln; 
    161164    import std.path : sep, getDirName, getName, addExt; 
     
    659662            int index = rfind(rel_path, FS.sep); 
    660663            if (index != -1) 
    661             {   filename = rel_path[index..length]; 
     664            {   filename = rel_path[index..$]; 
    662665                rel_path = replace(rel_path, filename, ""); 
    663666            } 
     
    774777            {   // if filename is longer than ext and filename's extention is ext. 
    775778                foreach (string ext; exts) 
    776                     if (filename.length>=ext.length && filename[(length-ext.length)..length]==ext) 
     779                    if (filename.length>=ext.length && filename[($-ext.length)..$]==ext) 
    777780                        result ~= name; 
    778781        }   }