Skip to content

Commit 9613745

Browse files
committed
---
yaml --- r: 139793 b: refs/heads/try2 c: 78bc10d h: refs/heads/master i: 139791: dfb2629 v: v3
1 parent b31cea4 commit 9613745

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 8e64b61df9a9b22dc742fcd25f0533f5b4580477
8+
refs/heads/try2: 78bc10d94bcaecbc45687b82e82dd46a79cd29b3
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libstd/base64.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static CHARS: [char, ..64] = [
2828

2929
impl<'self> ToBase64 for &'self [u8] {
3030
/**
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.
3232
*
3333
* *Example*:
3434
*
@@ -92,7 +92,7 @@ impl<'self> ToBase64 for &'self [u8] {
9292
9393
impl<'self> ToBase64 for &'self str {
9494
/**
95-
* Convert any string (literal, `@`, `&`, `~`) to base64 encoding.
95+
* Convert any string (literal, `@`, `&`, or `~`) to base64 encoding.
9696
*
9797
*
9898
* *Example*:
@@ -119,8 +119,8 @@ pub trait FromBase64 {
119119
120120
impl FromBase64 for ~[u8] {
121121
/**
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.
124124
*
125125
* *Example*:
126126
*
@@ -200,16 +200,15 @@ impl FromBase64 for ~[u8] {
200200
201201
impl FromBase64 for ~str {
202202
/**
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.
205205
*
206206
* You can use the `from_bytes` function in `core::str`
207207
* to turn a `[u8]` into a string with characters corresponding to those values.
208208
*
209209
* *Example*:
210210
*
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.
213212
*
214213
* ~~~~
215214
* extern mod std;

0 commit comments

Comments
 (0)