summary refs log tree commit diff
path: root/src/libstd/str.rs
AgeCommit message (Collapse)AuthorLines
2014-01-07stdtest: Fix all leaked trait importsAlex Crichton-5/+2
2014-01-07std: Fill in all missing importsAlex Crichton-4/+8
Fallout from the previous commits
2014-01-07auto merge of #11329 : fhahn/rust/unused-cast-lint2, r=alexcrichtonbors-2/+2
Updates as mentioned in #11135
2014-01-06auto merge of #10826 : SimonSapin/rust/str-insert, r=brsonbors-0/+42
I could not run the tests because of unrelated building issue, sorry about that.
2014-01-06Remove some unnecessary type castsFlorian Hahn-2/+2
Conflicts: src/librustc/middle/lint.rs
2014-01-04Don't allow newtype structs to be dereferenced. #6246Brian Anderson-2/+6
2013-12-31Add .insert() and .insert_char() methods to ~str.Simon Sapin-0/+42
2013-12-31Fix testsAlan Andrade-5/+9
2013-12-27std: uniform modules titles for docLuca Bruno-1/+1
This commit uniforms the short title of modules provided by libstd, in order to make their roles more explicit when glancing at the index. Signed-off-by: Luca Bruno <lucab@debian.org>
2013-12-23std: Fix all code examplesAlex Crichton-6/+8
2013-12-20std: silence warnings when compiling test.Huon Wilson-1/+0
2013-12-19auto merge of #11065 : huonw/rust/slice-chars-example, r=cmrbors-1/+1
2013-12-19std::str: fix .slice_chars example. Fixes #11014.Huon Wilson-1/+1
2013-12-19std::str: remove .as_mut_buf & rewrite/simplify `.push_char`.Huon Wilson-23/+6
`.as_mut_buf` was used exactly once, in `.push_char` which could be written in a simpler way, using the `&mut ~[u8]` that it already retrieved. In the rare situation when someone really needs `.as_mut_buf`-like functionality (getting a `*mut u8`), they can go via `str::raw::as_owned_vec`.
2013-12-19std::str: replace .as_imm_buf with .as_ptr.Huon Wilson-85/+55
2013-12-19std::vec: remove .as_muf_buf, replaced by .as_mut_ptr & .len.Huon Wilson-3/+4
2013-12-19std::vec: remove .as_imm_buf, replaced by .as_ptr & .len.Huon Wilson-1/+1
There's no need for the restrictions of a closure with the above methods.
2013-12-15auto merge of #10984 : huonw/rust/clean-raw, r=cmrbors-20/+22
See commits for details.
2013-12-15std::vec: convert to(_mut)_ptr to as_... methods on &[] and &mut [].Huon Wilson-2/+2
2013-12-15Move std::{str,vec}::raw::set_len to an unsafe method on Owned{Vector,Str}.Huon Wilson-18/+20
2013-12-15std: fix spelling in docs.Huon Wilson-6/+6
2013-12-11Make 'self lifetime illegal.Erik Price-130/+130
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-07std::str: Add examples to the StrSlice trait.Huon Wilson-42/+321
Fixes #10819.
2013-12-04std::str: s/from_utf8_slice/from_utf8/, to make the basic case shorter.Huon Wilson-15/+15
2013-12-04std::str: remove from_utf8.Huon Wilson-107/+7
This function had type &[u8] -> ~str, i.e. it allocates a string internally, even though the non-allocating version that take &[u8] -> &str and ~[u8] -> ~str are all that is necessary in most circumstances.
2013-11-26test: Remove non-procedure uses of `do` from compiletest, libstd tests,Patrick Walton-3/+9
compile-fail tests, run-fail tests, and run-pass tests.
2013-11-26libstd: Remove all non-`proc` uses of `do` from libstdPatrick Walton-106/+62
2013-11-26librustc: Remove remaining uses of `&fn()` in favor of `||`.Patrick Walton-1/+1
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-169/+169
2013-11-19libstd: Change all uses of `&fn(A)->B` over to `|A|->B` in libstdPatrick Walton-5/+5
2013-11-04docs: Replace std::iterator with std::iter.Huon Wilson-7/+7
2013-10-24Remove IoFactoryObject for ~IoFactoryAlex Crichton-1/+0
This involved changing a fair amount of code, rooted in how we access the local IoFactory instance. I added a helper method to the rtio module to access the optional local IoFactory. This is different than before in which it was assumed that a local IoFactory was *always* present. Now, a separate io_error is raised when an IoFactory is not present, yet I/O is requested.
2013-10-24Remove rt::io::supportAlex Crichton-48/+0
This removes the PathLike trait associated with this "support module". This is yet another "container of bytes" trait, so I didn't want to duplicate what already exists throughout libstd. In actuality, we're going to pass of C strings to the libuv APIs, so instead the arguments are now bound with the 'ToCStr' trait instead. Additionally, a layer of complexity was removed by immediately converting these type-generic parameters into CStrings to get handed off to libuv apis.
2013-10-23Removed the unnecesary commentsreedlepee-1/+0
2013-10-23Removed Unnecessary comments and white spaces #4386reedlepee-7/+0
2013-10-23Making fields in std and extra : private #4386reedlepee-2/+8
2013-10-23Don't Make str field privatereedlepee-0/+1
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-6/+6
Who doesn't like a massive renaming?
2013-10-17Fix starts_with() and ends_with().Jack Moffitt-2/+6
d4a32386f3b6 broke these since slice_to() and slice_from() must get character boundaries, and arbitrary needle lengths don't necessarily map to character boundaries of the haystack. This also adds new tests that would have caught this bug.
2013-10-16Rewrite str.starts_with()/ends_with() to be simplerKevin Ballard-19/+6
2013-10-15Require module documentation with missing_docAlex Crichton-0/+1
Closes #9824
2013-10-09option: rewrite the API to use compositionDaniel Micay-3/+3
2013-10-04auto merge of #9727 : Valloric/rust/doc-fixes, r=catamorphismbors-1/+1
2013-10-04Fixed another minor typo in std::str docsStrahinja Val Markovic-1/+1
2013-10-04Fix minor typo in std::str module docsStrahinja Val Markovic-1/+1
2013-10-02Add an implementation of FromStr for ~str and @strFlorian Gilcher-1/+21
This fixes an issue for APIs that return FromStr. Before this change, they would have to offer a seperate function for returning the source string.
2013-09-30std: Remove usage of fmt!Alex Crichton-14/+14
2013-09-27auto merge of #9550 : alexcrichton/rust/remove-printf, r=thestingerbors-1/+1
The 0.8 release was cut, down with printf!
2013-09-26std: removed some warnings in tests.Erick Tryzelaar-1/+1
2013-09-26Update the compiler to not use printf/printflnAlex Crichton-1/+1