diff options
| author | Kevin Cantu <me@kevincantu.org> | 2012-02-12 01:32:09 -0800 |
|---|---|---|
| committer | Kevin Cantu <me@kevincantu.org> | 2012-02-12 15:30:20 -0800 |
| commit | 2ba44e24d5fccfc6fe7c28a742d18e03b6acafae (patch) | |
| tree | 7533e535c883aa357f83fedeb097260f0a46a8d2 /src/comp/syntax | |
| parent | 2b4f5136a52041a88fbf3a03f627e9c00869f182 (diff) | |
| download | rust-2ba44e24d5fccfc6fe7c28a742d18e03b6acafae.tar.gz rust-2ba44e24d5fccfc6fe7c28a742d18e03b6acafae.zip | |
(core::str) rename byte_len_range -> substr_len_bytes and
rename char_len_range -> substr_len_chars
Diffstat (limited to 'src/comp/syntax')
| -rw-r--r-- | src/comp/syntax/codemap.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/comp/syntax/codemap.rs b/src/comp/syntax/codemap.rs index cb2590e1951..d1b60916e19 100644 --- a/src/comp/syntax/codemap.rs +++ b/src/comp/syntax/codemap.rs @@ -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}; } |
