about summary refs log tree commit diff
path: root/src/libstd/ffi/c_str.rs
diff options
context:
space:
mode:
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 de91e5f3268..1910530c63a 100644
--- a/src/libstd/ffi/c_str.rs
+++ b/src/libstd/ffi/c_str.rs
@@ -133,7 +133,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.
@@ -169,7 +169,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 `from_vec` except that no runtime assertion
@@ -258,7 +258,7 @@ impl From<NulError> for old_io::IoError {
 }
 
 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
@@ -301,7 +301,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
@@ -311,7 +311,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
@@ -329,7 +329,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.