@@ -28,7 +28,7 @@ static CHARS: [char, ..64] = [
28
28
29
29
impl < ' self > ToBase64 for & ' self [ u8 ] {
30
30
/**
31
- * Turn a vector of `u8` bytes into a string representing them in base64.
31
+ * Turn a vector of `u8` bytes into a base64 string .
32
32
*
33
33
* *Example*:
34
34
*
@@ -92,7 +92,7 @@ impl<'self> ToBase64 for &'self [u8] {
92
92
93
93
impl<'self> ToBase64 for &'self str {
94
94
/**
95
- * Convert any string (literal, `@`, `&`, `~`) to base64 encoding.
95
+ * Convert any string (literal, `@`, `&`, or `~`) to base64 encoding.
96
96
*
97
97
*
98
98
* *Example*:
@@ -119,8 +119,8 @@ pub trait FromBase64 {
119
119
120
120
impl FromBase64 for ~[u8] {
121
121
/**
122
- * Turn a vector of `u8`s representing characters
123
- * encoding byte values in base64 into the vector of `u8` byte values .
122
+ * Convert base64 `u8` vector into u8 byte values.
123
+ * Every 4 encoded characters is converted into 3 octets, modulo padding .
124
124
*
125
125
* *Example*:
126
126
*
@@ -200,16 +200,15 @@ impl FromBase64 for ~[u8] {
200
200
201
201
impl FromBase64 for ~str {
202
202
/**
203
- * Convert any string (literal, `@`, `&`, `~`)
204
- * that contains a base64 encoded value, to the byte values it encodes.
203
+ * Convert any base64 encoded string (literal, `@`, `&`, or `~`)
204
+ * to the byte values it encodes.
205
205
*
206
206
* You can use the `from_bytes` function in `core::str`
207
207
* to turn a `[u8]` into a string with characters corresponding to those values.
208
208
*
209
209
* *Example*:
210
210
*
211
- * This is an example of going from a string literal to the base64 encoding
212
- * and back to the same string.
211
+ * This converts a string literal to base64 and back.
213
212
*
214
213
* ~~~~
215
214
* extern mod std;
0 commit comments