about summary refs log tree commit diff
path: root/src/libstd/num
diff options
context:
space:
mode:
authorRicho Healey <richo@psych0tik.net>2014-05-22 16:57:53 -0700
committerRicho Healey <richo@psych0tik.net>2014-05-24 21:48:10 -0700
commit553074506ecd139eb961fb91eb33ad9fd0183acb (patch)
tree01682cf8147183250713acf5e8a77265aab7153c /src/libstd/num
parentbbb70cdd9cd982922cf7390459d53bde409699ae (diff)
downloadrust-553074506ecd139eb961fb91eb33ad9fd0183acb.tar.gz
rust-553074506ecd139eb961fb91eb33ad9fd0183acb.zip
core: rename strbuf::StrBuf to string::String
[breaking-change]
Diffstat (limited to 'src/libstd/num')
-rw-r--r--src/libstd/num/f32.rs18
-rw-r--r--src/libstd/num/f64.rs18
-rw-r--r--src/libstd/num/i16.rs2
-rw-r--r--src/libstd/num/i32.rs2
-rw-r--r--src/libstd/num/i64.rs2
-rw-r--r--src/libstd/num/i8.rs2
-rw-r--r--src/libstd/num/int.rs2
-rw-r--r--src/libstd/num/int_macros.rs2
-rw-r--r--src/libstd/num/mod.rs4
-rw-r--r--src/libstd/num/strconv.rs6
-rw-r--r--src/libstd/num/u16.rs2
-rw-r--r--src/libstd/num/u32.rs2
-rw-r--r--src/libstd/num/u64.rs2
-rw-r--r--src/libstd/num/u8.rs2
-rw-r--r--src/libstd/num/uint.rs2
-rw-r--r--src/libstd/num/uint_macros.rs2
16 files changed, 35 insertions, 35 deletions
diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs
index 66d93c230a5..b7bd3705bf2 100644
--- a/src/libstd/num/f32.rs
+++ b/src/libstd/num/f32.rs
@@ -20,7 +20,7 @@ use intrinsics;
 use libc::c_int;
 use num::strconv;
 use num;
-use strbuf::StrBuf;
+use string::String;
 
 pub use core::f32::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON, MIN_VALUE};
 pub use core::f32::{MIN_POS_VALUE, MAX_VALUE, MIN_EXP, MAX_EXP, MIN_10_EXP};
@@ -243,7 +243,7 @@ impl FloatMath for f32 {
 ///
 /// * num - The float value
 #[inline]
-pub fn to_str(num: f32) -> StrBuf {
+pub fn to_str(num: f32) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10u, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
     r
@@ -255,7 +255,7 @@ pub fn to_str(num: f32) -> StrBuf {
 ///
 /// * num - The float value
 #[inline]
-pub fn to_str_hex(num: f32) -> StrBuf {
+pub fn to_str_hex(num: f32) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 16u, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
     r
@@ -269,7 +269,7 @@ pub fn to_str_hex(num: f32) -> StrBuf {
 /// * num - The float value
 /// * radix - The base to use
 #[inline]
-pub fn to_str_radix_special(num: f32, rdx: uint) -> (StrBuf, bool) {
+pub fn to_str_radix_special(num: f32, rdx: uint) -> (String, bool) {
     strconv::float_to_str_common(num, rdx, true,
                            strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false)
 }
@@ -282,7 +282,7 @@ pub fn to_str_radix_special(num: f32, rdx: uint) -> (StrBuf, bool) {
 /// * num - The float value
 /// * digits - The number of significant digits
 #[inline]
-pub fn to_str_exact(num: f32, dig: uint) -> StrBuf {
+pub fn to_str_exact(num: f32, dig: uint) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10u, true, strconv::SignNeg, strconv::DigExact(dig), strconv::ExpNone, false);
     r
@@ -296,7 +296,7 @@ pub fn to_str_exact(num: f32, dig: uint) -> StrBuf {
 /// * num - The float value
 /// * digits - The number of significant digits
 #[inline]
-pub fn to_str_digits(num: f32, dig: uint) -> StrBuf {
+pub fn to_str_digits(num: f32, dig: uint) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10u, true, strconv::SignNeg, strconv::DigMax(dig), strconv::ExpNone, false);
     r
@@ -311,7 +311,7 @@ pub fn to_str_digits(num: f32, dig: uint) -> StrBuf {
 /// * digits - The number of digits after the decimal point
 /// * upper - Use `E` instead of `e` for the exponent sign
 #[inline]
-pub fn to_str_exp_exact(num: f32, dig: uint, upper: bool) -> StrBuf {
+pub fn to_str_exp_exact(num: f32, dig: uint, upper: bool) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10u, true, strconv::SignNeg, strconv::DigExact(dig), strconv::ExpDec, upper);
     r
@@ -326,7 +326,7 @@ pub fn to_str_exp_exact(num: f32, dig: uint, upper: bool) -> StrBuf {
 /// * digits - The number of digits after the decimal point
 /// * upper - Use `E` instead of `e` for the exponent sign
 #[inline]
-pub fn to_str_exp_digits(num: f32, dig: uint, upper: bool) -> StrBuf {
+pub fn to_str_exp_digits(num: f32, dig: uint, upper: bool) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10u, true, strconv::SignNeg, strconv::DigMax(dig), strconv::ExpDec, upper);
     r
@@ -346,7 +346,7 @@ impl num::ToStrRadix for f32 {
     /// possible misinterpretation of the result at higher bases. If those values
     /// are expected, use `to_str_radix_special()` instead.
     #[inline]
-    fn to_str_radix(&self, rdx: uint) -> StrBuf {
+    fn to_str_radix(&self, rdx: uint) -> String {
         let (r, special) = strconv::float_to_str_common(
             *self, rdx, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
         if special { fail!("number has a special value, \
diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs
index be4e4dc0d66..e7b29c733ec 100644
--- a/src/libstd/num/f64.rs
+++ b/src/libstd/num/f64.rs
@@ -19,7 +19,7 @@ use intrinsics;
 use libc::c_int;
 use num::strconv;
 use num;
-use strbuf::StrBuf;
+use string::String;
 
 pub use core::f64::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON, MIN_VALUE};
 pub use core::f64::{MIN_POS_VALUE, MAX_VALUE, MIN_EXP, MAX_EXP, MIN_10_EXP};
@@ -251,7 +251,7 @@ impl FloatMath for f64 {
 ///
 /// * num - The float value
 #[inline]
-pub fn to_str(num: f64) -> StrBuf {
+pub fn to_str(num: f64) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10u, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
     r
@@ -263,7 +263,7 @@ pub fn to_str(num: f64) -> StrBuf {
 ///
 /// * num - The float value
 #[inline]
-pub fn to_str_hex(num: f64) -> StrBuf {
+pub fn to_str_hex(num: f64) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 16u, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
     r
@@ -277,7 +277,7 @@ pub fn to_str_hex(num: f64) -> StrBuf {
 /// * num - The float value
 /// * radix - The base to use
 #[inline]
-pub fn to_str_radix_special(num: f64, rdx: uint) -> (StrBuf, bool) {
+pub fn to_str_radix_special(num: f64, rdx: uint) -> (String, bool) {
     strconv::float_to_str_common(num, rdx, true,
                            strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false)
 }
@@ -290,7 +290,7 @@ pub fn to_str_radix_special(num: f64, rdx: uint) -> (StrBuf, bool) {
 /// * num - The float value
 /// * digits - The number of significant digits
 #[inline]
-pub fn to_str_exact(num: f64, dig: uint) -> StrBuf {
+pub fn to_str_exact(num: f64, dig: uint) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10u, true, strconv::SignNeg, strconv::DigExact(dig), strconv::ExpNone, false);
     r
@@ -304,7 +304,7 @@ pub fn to_str_exact(num: f64, dig: uint) -> StrBuf {
 /// * num - The float value
 /// * digits - The number of significant digits
 #[inline]
-pub fn to_str_digits(num: f64, dig: uint) -> StrBuf {
+pub fn to_str_digits(num: f64, dig: uint) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10u, true, strconv::SignNeg, strconv::DigMax(dig), strconv::ExpNone, false);
     r
@@ -319,7 +319,7 @@ pub fn to_str_digits(num: f64, dig: uint) -> StrBuf {
 /// * digits - The number of digits after the decimal point
 /// * upper - Use `E` instead of `e` for the exponent sign
 #[inline]
-pub fn to_str_exp_exact(num: f64, dig: uint, upper: bool) -> StrBuf {
+pub fn to_str_exp_exact(num: f64, dig: uint, upper: bool) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10u, true, strconv::SignNeg, strconv::DigExact(dig), strconv::ExpDec, upper);
     r
@@ -334,7 +334,7 @@ pub fn to_str_exp_exact(num: f64, dig: uint, upper: bool) -> StrBuf {
 /// * digits - The number of digits after the decimal point
 /// * upper - Use `E` instead of `e` for the exponent sign
 #[inline]
-pub fn to_str_exp_digits(num: f64, dig: uint, upper: bool) -> StrBuf {
+pub fn to_str_exp_digits(num: f64, dig: uint, upper: bool) -> String {
     let (r, _) = strconv::float_to_str_common(
         num, 10u, true, strconv::SignNeg, strconv::DigMax(dig), strconv::ExpDec, upper);
     r
@@ -354,7 +354,7 @@ impl num::ToStrRadix for f64 {
     /// possible misinterpretation of the result at higher bases. If those values
     /// are expected, use `to_str_radix_special()` instead.
     #[inline]
-    fn to_str_radix(&self, rdx: uint) -> StrBuf {
+    fn to_str_radix(&self, rdx: uint) -> String {
         let (r, special) = strconv::float_to_str_common(
             *self, rdx, true, strconv::SignNeg, strconv::DigAll, strconv::ExpNone, false);
         if special { fail!("number has a special value, \
diff --git a/src/libstd/num/i16.rs b/src/libstd/num/i16.rs
index 7d08c181e9e..e0c5d93f28a 100644
--- a/src/libstd/num/i16.rs
+++ b/src/libstd/num/i16.rs
@@ -15,7 +15,7 @@ use num::{ToStrRadix, FromStrRadix};
 use num::strconv;
 use option::Option;
 use slice::ImmutableVector;
-use strbuf::StrBuf;
+use string::String;
 
 pub use core::i16::{BITS, BYTES, MIN, MAX};
 
diff --git a/src/libstd/num/i32.rs b/src/libstd/num/i32.rs
index 2504d3f5766..6938689f47d 100644
--- a/src/libstd/num/i32.rs
+++ b/src/libstd/num/i32.rs
@@ -15,7 +15,7 @@ use num::{ToStrRadix, FromStrRadix};
 use num::strconv;
 use option::Option;
 use slice::ImmutableVector;
-use strbuf::StrBuf;
+use string::String;
 
 pub use core::i32::{BITS, BYTES, MIN, MAX};
 
diff --git a/src/libstd/num/i64.rs b/src/libstd/num/i64.rs
index 7fc6a091dfc..4be43876105 100644
--- a/src/libstd/num/i64.rs
+++ b/src/libstd/num/i64.rs
@@ -15,7 +15,7 @@ use num::{ToStrRadix, FromStrRadix};
 use num::strconv;
 use option::Option;
 use slice::ImmutableVector;
-use strbuf::StrBuf;
+use string::String;
 
 pub use core::i64::{BITS, BYTES, MIN, MAX};
 
diff --git a/src/libstd/num/i8.rs b/src/libstd/num/i8.rs
index a39a6ced077..b0459ca46f1 100644
--- a/src/libstd/num/i8.rs
+++ b/src/libstd/num/i8.rs
@@ -15,7 +15,7 @@ use num::{ToStrRadix, FromStrRadix};
 use num::strconv;
 use option::Option;
 use slice::ImmutableVector;
-use strbuf::StrBuf;
+use string::String;
 
 pub use core::i8::{BITS, BYTES, MIN, MAX};
 
diff --git a/src/libstd/num/int.rs b/src/libstd/num/int.rs
index 2a23a35be6d..774b0d7d8cf 100644
--- a/src/libstd/num/int.rs
+++ b/src/libstd/num/int.rs
@@ -15,7 +15,7 @@ use num::{ToStrRadix, FromStrRadix};
 use num::strconv;
 use option::Option;
 use slice::ImmutableVector;
-use strbuf::StrBuf;
+use string::String;
 
 pub use core::int::{BITS, BYTES, MIN, MAX};
 
diff --git a/src/libstd/num/int_macros.rs b/src/libstd/num/int_macros.rs
index 31a0edfbc38..4456c8124ba 100644
--- a/src/libstd/num/int_macros.rs
+++ b/src/libstd/num/int_macros.rs
@@ -77,7 +77,7 @@ pub fn to_str_bytes<U>(n: $T, radix: uint, f: |v: &[u8]| -> U) -> U {
 impl ToStrRadix for $T {
     /// Convert to a string in a given base.
     #[inline]
-    fn to_str_radix(&self, radix: uint) -> StrBuf {
+    fn to_str_radix(&self, radix: uint) -> String {
         format_strbuf!("{}", ::fmt::radix(*self, radix as u8))
     }
 }
diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs
index c1d6bbb492d..9700f8c9970 100644
--- a/src/libstd/num/mod.rs
+++ b/src/libstd/num/mod.rs
@@ -16,7 +16,7 @@
 #![allow(missing_doc)]
 
 use option::Option;
-use strbuf::StrBuf;
+use string::String;
 
 #[cfg(test)] use fmt::Show;
 
@@ -112,7 +112,7 @@ pub trait FloatMath: Float {
 
 /// A generic trait for converting a value to a string with a radix (base)
 pub trait ToStrRadix {
-    fn to_str_radix(&self, radix: uint) -> StrBuf;
+    fn to_str_radix(&self, radix: uint) -> String;
 }
 
 /// A generic trait for converting a string with a radix (base) to a value
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs
index 795534dc283..1efe83217f4 100644
--- a/src/libstd/num/strconv.rs
+++ b/src/libstd/num/strconv.rs
@@ -22,7 +22,7 @@ use option::{None, Option, Some};
 use slice::{ImmutableVector, MutableVector};
 use std::cmp::{Ord, Eq};
 use str::StrSlice;
-use strbuf::StrBuf;
+use string::String;
 use vec::Vec;
 
 /// A flag that specifies whether to use exponential (scientific) notation.
@@ -496,10 +496,10 @@ pub fn float_to_str_common<T:NumCast+Zero+One+Eq+Ord+NumStrConv+Float+
                              Div<T,T>+Neg<T>+Rem<T,T>+Mul<T,T>>(
         num: T, radix: uint, negative_zero: bool,
         sign: SignFormat, digits: SignificantDigits, exp_format: ExponentFormat, exp_capital: bool
-        ) -> (StrBuf, bool) {
+        ) -> (String, bool) {
     let (bytes, special) = float_to_str_bytes_common(num, radix,
                                negative_zero, sign, digits, exp_format, exp_capital);
-    (StrBuf::from_utf8(bytes).unwrap(), special)
+    (String::from_utf8(bytes).unwrap(), special)
 }
 
 // Some constants for from_str_bytes_common's input validation,
diff --git a/src/libstd/num/u16.rs b/src/libstd/num/u16.rs
index 6d68af99890..5200fbd7a3b 100644
--- a/src/libstd/num/u16.rs
+++ b/src/libstd/num/u16.rs
@@ -15,7 +15,7 @@ use num::{ToStrRadix, FromStrRadix};
 use num::strconv;
 use option::Option;
 use slice::ImmutableVector;
-use strbuf::StrBuf;
+use string::String;
 
 pub use core::u16::{BITS, BYTES, MIN, MAX};
 
diff --git a/src/libstd/num/u32.rs b/src/libstd/num/u32.rs
index 130ca2c4855..18cdb9e7e87 100644
--- a/src/libstd/num/u32.rs
+++ b/src/libstd/num/u32.rs
@@ -15,7 +15,7 @@ use num::{ToStrRadix, FromStrRadix};
 use num::strconv;
 use option::Option;
 use slice::ImmutableVector;
-use strbuf::StrBuf;
+use string::String;
 
 pub use core::u32::{BITS, BYTES, MIN, MAX};
 
diff --git a/src/libstd/num/u64.rs b/src/libstd/num/u64.rs
index 559fcf6e7d1..7c17d2cd0bd 100644
--- a/src/libstd/num/u64.rs
+++ b/src/libstd/num/u64.rs
@@ -15,7 +15,7 @@ use num::{ToStrRadix, FromStrRadix};
 use num::strconv;
 use option::Option;
 use slice::ImmutableVector;
-use strbuf::StrBuf;
+use string::String;
 
 pub use core::u64::{BITS, BYTES, MIN, MAX};
 
diff --git a/src/libstd/num/u8.rs b/src/libstd/num/u8.rs
index f855c8c4951..05d86fba40e 100644
--- a/src/libstd/num/u8.rs
+++ b/src/libstd/num/u8.rs
@@ -15,7 +15,7 @@ use num::{ToStrRadix, FromStrRadix};
 use num::strconv;
 use option::Option;
 use slice::ImmutableVector;
-use strbuf::StrBuf;
+use string::String;
 
 pub use core::u8::{BITS, BYTES, MIN, MAX};
 
diff --git a/src/libstd/num/uint.rs b/src/libstd/num/uint.rs
index f651cf72cca..ac38f740931 100644
--- a/src/libstd/num/uint.rs
+++ b/src/libstd/num/uint.rs
@@ -15,7 +15,7 @@ use num::{ToStrRadix, FromStrRadix};
 use num::strconv;
 use option::Option;
 use slice::ImmutableVector;
-use strbuf::StrBuf;
+use string::String;
 
 pub use core::uint::{BITS, BYTES, MIN, MAX};
 
diff --git a/src/libstd/num/uint_macros.rs b/src/libstd/num/uint_macros.rs
index ba329065a6e..e59e638faa9 100644
--- a/src/libstd/num/uint_macros.rs
+++ b/src/libstd/num/uint_macros.rs
@@ -78,7 +78,7 @@ pub fn to_str_bytes<U>(n: $T, radix: uint, f: |v: &[u8]| -> U) -> U {
 impl ToStrRadix for $T {
     /// Convert to a string in a given base.
     #[inline]
-    fn to_str_radix(&self, radix: uint) -> StrBuf {
+    fn to_str_radix(&self, radix: uint) -> String {
         format_strbuf!("{}", ::fmt::radix(*self, radix as u8))
     }
 }