about summary refs log tree commit diff
path: root/src/libstd/str.rs
AgeCommit message (Collapse)AuthorLines
2013-07-23std: rename str.as_buf to as_imm_buf, add str.as_mut_bufErick Tryzelaar-65/+59
2013-07-23std: add test for str::as_c_strErick Tryzelaar-0/+22
2013-07-23std: move StrUtil::as_c_str into StrSliceErick Tryzelaar-45/+29
2013-07-23std: move str::as_buf into StrSliceErick Tryzelaar-48/+48
2013-07-23std: rename str.as_bytes_with_null_consume to str.to_bytes_with_nullErick Tryzelaar-7/+6
2013-07-23std: wrap "long" utf8 lines.Graydon Hoare-2/+4
2013-07-22std: add preliminary str benchmark.Graydon Hoare-0/+45
2013-07-22new snapshotDaniel Micay-13/+0
2013-07-21auto merge of #7932 : blake2-ppc/rust/str-clear, r=huonwbors-1/+51
~str and @str need separate implementations for use in generic functions, where it will not automatically use the impl on &str. fixes issue #7900
2013-07-20std: Implement Clone for VecIterator and iterators using itblake2-ppc-0/+7
The theory is simple, the immutable iterators simply hold state variables (indicies or pointers) into frozen containers. We can freely clone these iterators, just like we can clone borrowed pointers. VecIterator needs a manual impl to handle the lifetime struct member.
2013-07-20str: Implement Container for ~str, @str and Mutable for ~strblake2-ppc-1/+51
~str and @str need separate implementations for use in generic functions, where it will not automatically use the impl on &str.
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-1/+8
2013-07-15remove headers from unique vectorsDaniel Micay-1/+14
2013-07-11Optimize is_utf8Gary Linscott-8/+16
Manually unroll the multibyte loops, and optimize for the single byte chars.
2013-07-11char_range_at perf workGary Linscott-28/+60
Moves multibyte code to it's own function to make char_range_at easier to inline, and faster for single and multibyte chars. Benchmarked reading example.json 100 times, 1.18s before, 1.08s after.
2013-07-08auto merge of #7612 : thestinger/rust/utf8, r=huonwbors-22/+2
2013-07-08Merge pull request #7595 from thestinger/iteratorDaniel Micay-1/+1
remove some method resolve workarounds
2013-07-07remove some method resolve workaroundsDaniel Micay-1/+1
2013-07-06remove extra::ropeDaniel Micay-2/+1
It's broken/unmaintained and needs to be rewritten to avoid managed pointers and needless copies. A full rewrite is necessary and the API will need to be redone so it's not worth keeping this around. Closes #2236, #2744
2013-07-05str: stop encoding invalid out-of-range `char`Daniel Micay-22/+2
2013-07-04Convert vec::{as_imm_buf, as_mut_buf} to methods.Huon Wilson-3/+4
2013-07-01rustc: add a lint to enforce uppercase statics.Huon Wilson-40/+40
2013-06-30Specialize to_str_common for floats/integers in strconvAlex Crichton-3/+32
This allows the integral paths to avoid allocations on the heap Closes #4424, #4423
2013-06-29auto merge of #7475 : Seldaek/rust/fixsplit, r=cmrbors-1/+10
I almost got locked out of my machine because I misunderstood the purpose of the function and called it with a limit of uint::max_value, which turned this function into an almost endless loop.
2013-06-29Removing a lot of usage of '&const'Alex Crichton-4/+4
2013-06-29'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep ↵Ben Blum-2/+2
for making them noncopyable.
2013-06-29Optimize str::each_split_within when it is called with large limitsJordi Boggiano-1/+10
2013-06-28Rewrite each_path to allow performance improvements in the future.Patrick Walton-10/+11
Instead of determining paths from the path tag, we iterate through modules' children recursively in the metadata. This will allow for lazy external module resolution.
2013-06-28librustc: Fix merge fallout.Patrick Walton-2/+4
2013-06-28librustc: Rewrite reachability and forbid duplicate methods in type ↵Patrick Walton-1/+2
implementations. This should allow fewer symbols to be exported.
2013-06-28libstd: Fix merge fallout.Patrick Walton-2/+3
2013-06-28librustc: Disallow "mut" from distributing over bindings.Patrick Walton-1/+69
This is the backwards-incompatible part of per-binding-site "mut".
2013-06-27auto merge of #7430 : huonw/rust/vec-kill, r=thestingerbors-4/+5
2013-06-28std: silence some test warnings.Huon Wilson-1/+2
2013-06-28Convert vec::{reserve, reserve_at_least, capacity} to methods.Huon Wilson-3/+3
2013-06-24Merge remote-tracking branch 'reusee/master' into HEADBrian Anderson-1/+1
2013-06-24remove old_iterDaniel Micay-2/+0
the `test/run-pass/class-trait-bounded-param.rs` test was xfailed and written in an ancient dialect of Rust so I've just removed it this also removes `to_vec` from DList because it's provided by `std::iter::to_vec` an Iterator implementation is added for OptVec but some transitional internal iterator methods are still left
2013-06-23vec: remove BaseIter implementationDaniel Micay-5/+5
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-22replaced some 'std::' with 'extra::' in commentsreus-1/+1
2013-06-21replace vec::find with the IteratorUtil methodDaniel Micay-1/+1
2013-06-21vec: rm old_iter implementations, except BaseIterDaniel Micay-1/+1
The removed test for issue #2611 is well covered by the `std::iterator` module itself. This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-44/+44
2013-06-17std: add Zero impls for &[] and &str.Huon Wilson-0/+20
2013-06-16auto merge of #7142 : alexcrichton/rust/deriving-zero, r=pcwaltonbors-0/+11
This allows mass-initialization of large structs without having to specify all the fields. I'm a bit hesitant, but I wanted to get this out there. I don't really like using the `Zero` trait, because it doesn't really make sense for a type like `HashMap` to use `Zero` as the 'blank allocation' trait. In theory there'd be a new trait, but then that's adding cruft to the language which may not necessarily need to be there. I do think that this can be useful, but I only implemented `Zero` on the basic types where I thought it made sense, so it may not be all that usable yet. (opinions?)
2013-06-16std: allow any sort of string to be Added with +.Huon Wilson-2/+22
2013-06-16std: test-fixes, remove warnings, syntax highlighting for code examples.Huon Wilson-3/+3
2013-06-16std: continue improving the comparison trait impls for str.Huon Wilson-166/+128
This moves them all into the traits submodule, and delegates Ord to the TotalOrd instance. It also deletes the stand-alone lt, gt, ge and le functions.
2013-06-16std: simplify the string comparison implementations, using iterators.Huon Wilson-30/+14
2013-06-16std: convert str::to_utf16 to a method.Huon Wilson-27/+28
2013-06-16std: convert str::{map,levdistance,subslice_offset} to methods.Huon Wilson-108/+110
The first two become map_chars and lev_distance. Also, remove a few allocations in rustdoc.