1
Fork 0

Convert more core types to camel case

This commit is contained in:
Brian Anderson 2012-08-14 16:54:13 -07:00
parent 8be0f665bc
commit 74c69e1053
67 changed files with 457 additions and 427 deletions

View file

@ -108,8 +108,8 @@ export
unsafe,
extensions,
str_slice,
unique_str;
StrSlice,
UniqueStr;
#[abi = "cdecl"]
extern mod rustrt {
@ -1877,7 +1877,7 @@ mod unsafe {
/// Sets the length of the string and adds the null terminator
unsafe fn set_len(&v: ~str, new_len: uint) {
let repr: *vec::unsafe::vec_repr = ::unsafe::reinterpret_cast(v);
let repr: *vec::unsafe::VecRepr = ::unsafe::reinterpret_cast(v);
(*repr).fill = new_len + 1u;
let null = ptr::mut_offset(ptr::mut_addr_of((*repr).data), new_len);
*null = 0u8;
@ -1895,14 +1895,14 @@ mod unsafe {
}
trait unique_str {
trait UniqueStr {
fn trim() -> self;
fn trim_left() -> self;
fn trim_right() -> self;
}
/// Extension methods for strings
impl ~str: unique_str {
impl ~str: UniqueStr {
/// Returns a string with leading and trailing whitespace removed
#[inline]
fn trim() -> ~str { trim(self) }
@ -1922,7 +1922,7 @@ impl ~str: add<&str,~str> {
}
}
trait str_slice {
trait StrSlice {
fn all(it: fn(char) -> bool) -> bool;
fn any(it: fn(char) -> bool) -> bool;
fn contains(needle: &a/str) -> bool;
@ -1951,7 +1951,7 @@ trait str_slice {
}
/// Extension methods for strings
impl &str: str_slice {
impl &str: StrSlice {
/**
* Return true if a predicate matches all characters or if the string
* contains no characters