Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(core::str) mark push/pop/shift byte functions unsafe, rename len functions, and fix replace #1824

Merged
merged 5 commits into from
Feb 13, 2012

Conversation

killerswan
Copy link
Contributor

Various updates to core::str, including:

  • move push_byte, push_bytes, pop_byte, and shift_byte into str::unsafe and mark them unsafe
  • rename byte_len -> len_bytes
  • rename char_len -> len / len_chars
  • rename byte_len_range -> substr_len_bytes and
  • rename char_len_range -> substr_len_chars
  • fix replace and starts_with (for UTF-8) and add more unicode find/contains/replace test cases

(Third try re: #1819 and #1820.)

@brson brson merged commit f5e1108 into rust-lang:master Feb 13, 2012
@brson
Copy link
Contributor

brson commented Feb 13, 2012

I pushed it anyway because I'm not that concerned about the performance of starts_with, but if we can avoid traversing the entirety of both strings that would be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants