about summary refs log tree commit diff
path: root/src/libstd/ffi/c_str.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-04-14 10:56:57 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-04-14 10:56:57 -0700
commitae7959d298c95d5ffdeae8e7c3f3659d7fc28cdb (patch)
tree575fb3a8174b9103d9976f8f665c75e0922ccb1b /src/libstd/ffi/c_str.rs
parent7913f5659d2dd8e8de74d25ad2594b219aa460cc (diff)
parent6fa16d6a473415415cb87a1fe6754aace32cbb1c (diff)
rollup merge of #24377: apasel422/docs
Conflicts:
	src/libstd/net/ip.rs
	src/libstd/sys/unix/fs.rs
	src/libstd/sys/unix/mod.rs
	src/libstd/sys/windows/mod.rs
Diffstat (limited to 'src/libstd/ffi/c_str.rs')
-rw-r--r--src/libstd/ffi/c_str.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs
index 78e21bdd14e..c1c05da4ee4 100644
--- a/src/libstd/ffi/c_str.rs
+++ b/src/libstd/ffi/c_str.rs
@@ -131,7 +131,7 @@ pub struct CStr {
 pub struct NulError(usize, Vec<u8>);
 
 impl CString {
-    /// Create a new C-compatible string from a container of bytes.
+    /// Creates a new C-compatible string from a container of bytes.
     ///
     /// This method will consume the provided data and use the underlying bytes
     /// to construct a new string, ensuring that there is a trailing 0 byte.
@@ -167,7 +167,7 @@ impl CString {
         }
     }
 
-    /// Create a C-compatible string from a byte vector without checking for
+    /// Creates a C-compatible string from a byte vector without checking for
     /// interior 0 bytes.
     ///
     /// This method is equivalent to `new` except that no runtime assertion
@@ -245,7 +245,7 @@ impl From<NulError> for io::Error {
 }
 
 impl CStr {
-    /// Cast a raw C string to a safe C string wrapper.
+    /// Casts a raw C string to a safe C string wrapper.
     ///
     /// This function will cast the provided `ptr` to the `CStr` wrapper which
     /// allows inspection and interoperation of non-owned C strings. This method
@@ -288,7 +288,7 @@ impl CStr {
         mem::transmute(slice::from_raw_parts(ptr, len as usize + 1))
     }
 
-    /// Return the inner pointer to this C string.
+    /// Returns the inner pointer to this C string.
     ///
     /// The returned pointer will be valid for as long as `self` is and points
     /// to a contiguous region of memory terminated with a 0 byte to represent
@@ -298,7 +298,7 @@ impl CStr {
         self.inner.as_ptr()
     }
 
-    /// Convert this C string to a byte slice.
+    /// Converts this C string to a byte slice.
     ///
     /// This function will calculate the length of this string (which normally
     /// requires a linear amount of work to be done) and then return the
@@ -316,7 +316,7 @@ impl CStr {
         &bytes[..bytes.len() - 1]
     }
 
-    /// Convert this C string to a byte slice containing the trailing 0 byte.
+    /// Converts this C string to a byte slice containing the trailing 0 byte.
     ///
     /// This function is the equivalent of `to_bytes` except that it will retain
     /// the trailing nul instead of chopping it off.