Changeset 757

Show
Ignore:
Timestamp:
06/24/08 02:56:40 (3 months ago)
Author:
walter
Message:

fix std.format for 203

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/phobos/std/format.d

    r689 r757  
    510510        int prepad = 0; 
    511511        int postpad = 0; 
    512         int padding = field_width - (strlen(prefix) + s.length); 
     512        int padding = field_width - (strlen(prefix) + toUCSindex(s, s.length)); 
    513513        if (padding > 0) 
    514514        { 
     
    15631563    r = std.string.format(">%14d<, ", 15, [1,2,3]); 
    15641564    assert(r == ">            15<, [1,2,3]"); 
     1565 
     1566    assert(std.string.format("%8s", "bar") == "     bar"); 
     1567    assert(std.string.format("%8s", "b\u00e9ll\u00f4") == "   b\u00e9ll\u00f4"); 
    15651568} 
    15661569