Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc review, as requested :-). #1

Merged
merged 1 commit into from
Apr 13, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/libstd/base64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static CHARS: [char, ..64] = [

impl<'self> ToBase64 for &'self [u8] {
/**
* Turn a vector of `u8` bytes into a string representing them in base64.
* Turn a vector of `u8` bytes into a base64 string.
*
* *Example*:
*
Expand Down Expand Up @@ -92,7 +92,7 @@ impl<'self> ToBase64 for &'self [u8] {

impl<'self> ToBase64 for &'self str {
/**
* Convert any string (literal, `@`, `&`, `~`) to base64 encoding.
* Convert any string (literal, `@`, `&`, or `~`) to base64 encoding.
*
*
* *Example*:
Expand All @@ -119,8 +119,8 @@ pub trait FromBase64 {

impl FromBase64 for ~[u8] {
/**
* Turn a vector of `u8`s representing characters
* encoding byte values in base64 into the vector of `u8` byte values.
* Convert base64 `u8` vector into u8 byte values.
* Every 4 encoded characters is converted into 3 octets, modulo padding.
*
* *Example*:
*
Expand Down Expand Up @@ -200,16 +200,15 @@ impl FromBase64 for ~[u8] {

impl FromBase64 for ~str {
/**
* Convert any string (literal, `@`, `&`, `~`)
* that contains a base64 encoded value, to the byte values it encodes.
* Convert any base64 encoded string (literal, `@`, `&`, or `~`)
* to the byte values it encodes.
*
* You can use the `from_bytes` function in `core::str`
* to turn a `[u8]` into a string with characters corresponding to those values.
*
* *Example*:
*
* This is an example of going from a string literal to the base64 encoding
* and back to the same string.
* This converts a string literal to base64 and back.
*
* ~~~~
* extern mod std;
Expand Down