summary refs log tree commit diff
path: root/src/libstd/c_str.rs
AgeCommit message (Collapse)AuthorLines
2013-09-25rustdoc: Change all code-blocks with a scriptAlex Crichton-4/+4
find src -name '*.rs' | xargs sed -i '' 's/~~~.*{\.rust}/```rust/g' find src -name '*.rs' | xargs sed -i '' 's/ ~~~$/ ```/g' find src -name '*.rs' | xargs sed -i '' 's/^~~~$/ ```/g'
2013-09-20auto merge of #9276 : alexcrichton/rust/dox, r=brsonbors-0/+52
Hopefull this will make our libstd docs appear a little more "full".
2013-09-18Register new snapshotsAlex Crichton-3/+1
2013-09-17Document a few undocumented modules in libstdAlex Crichton-0/+52
Hopefull this will make our libstd docs appear a little more "full".
2013-09-16switch Drop to `&mut self`Daniel Micay-1/+1
2013-09-15c_str: Add new method .as_str() -> Option<&str>Kevin Ballard-3/+74
Also rustify .as_bytes(), so it no longer calls libc::strlen() and is inlineable.
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-2/+2
The trait will keep the `Iterator` naming, but a more concise module name makes using the free functions less verbose. The module will define iterables in addition to iterators, as it deals with iteration in general.
2013-09-04Added explicit pub to several conditions. Enables completion of #6009.Felix S. Klock II-3/+3
2013-09-03Fixes #8881. condition! imports parent's pub identifiersjmgrosen-0/+2
2013-08-27Remove offset_inbounds for an unsafe offset functionAlex Crichton-2/+2
2013-08-22Enabled unit tests in std and extra.Vadim Chugunov-2/+0
2013-08-19Add externfn macro and correctly label fixed_stack_segmentsNiko Matsakis-0/+8
2013-08-15Make CString.iter() publicKevin Ballard-1/+1
2013-08-15Add ToCStr method .with_c_str()Kevin Ballard-0/+23
.with_c_str() is a replacement for the old .as_c_str(), to avoid unnecessary boilerplate. Replace all usages of .to_c_str().with_ref() with .with_c_str().
2013-08-15Check for interior nulls in .to_c_str()Kevin Ballard-12/+99
Previous dicussions about CString suggested that interior nulls should throw an error. This was never implemented. Add this now, using a condition (named null_byte) to allow for recovery. Add method .to_c_str_unchecked() that skips this check.
2013-08-14Clarify docs on CString.unwrap()Kevin Ballard-0/+1
CString.unwrap() drops ownership of the buffer on the floor. Put this in the docs.
2013-08-07std: fix a bad type cast for in str.to_c_str()Erick Tryzelaar-1/+1
2013-08-07std: Make CString::new unsafe b/c it can mutate a *T ptrErick Tryzelaar-2/+2
2013-08-07std: remove unnecessary test from c_str.drop and use safer transmuteErick Tryzelaar-2/+2
2013-08-07std: Fix c_str.iter() and add testErick Tryzelaar-3/+20
2013-08-05std: c_str should use regions on methodsErick Tryzelaar-3/+3
2013-08-04std: Update the c_str docs, and support CString not owning the pointerErick Tryzelaar-138/+63
2013-08-04std: replace str::as_c_str with std::c_strErick Tryzelaar-0/+291