(core::str) rename byte_len_range -> substr_len_bytes and

rename char_len_range -> substr_len_chars
This commit is contained in:
Kevin Cantu
2012-02-12 01:32:09 -08:00
parent 2b4f5136a5
commit 2ba44e24d5
3 changed files with 56 additions and 48 deletions

View File

@@ -135,7 +135,7 @@ fn lookup_byte_offset(cm: codemap::codemap, chpos: uint)
let {fm,line} = lookup_line(cm,chpos,lookup);
let line_offset = fm.lines[line].byte - fm.start_pos.byte;
let col = chpos - fm.lines[line].ch;
let col_offset = str::byte_len_range(*fm.src, line_offset, col);
let col_offset = str::substr_len_bytes(*fm.src, line_offset, col);
ret {fm: fm, pos: line_offset + col_offset};
}