Skip to content

Commit cd0e57d

Browse files
committed
stdlib: Fix spelling errors in documentation of libstd/str.rs
1 parent 21cf9c8 commit cd0e57d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/libstd/str.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const tag_six_b: uint = 252u;
6666
/*
6767
Function: is_utf8
6868
69-
Determines if a vector uf bytes contains valid UTF-8
69+
Determines if a vector of bytes contains valid UTF-8
7070
*/
7171
fn is_utf8(v: [u8]) -> bool {
7272
let i = 0u;
@@ -546,7 +546,7 @@ needle - The string to look for
546546
547547
Returns:
548548
549-
The index of the first occurance of `needle`, or -1 if not found.
549+
The index of the first occurrence of `needle`, or -1 if not found.
550550
*/
551551
fn find(haystack: str, needle: str) -> int {
552552
let haystack_len: int = byte_len(haystack) as int;
@@ -723,11 +723,11 @@ fn push_bytes(&s: str, bytes: [u8]) {
723723
/*
724724
Function: split
725725
726-
Split a string at each occurance of a given separator
726+
Split a string at each occurrence of a given separator
727727
728728
Returns:
729729
730-
A vector containing all the strings between each occurance of the separator
730+
A vector containing all the strings between each occurrence of the separator
731731
*/
732732
fn split(s: str, sep: u8) -> [str] {
733733
let v: [str] = [];
@@ -795,7 +795,7 @@ fn to_upper(s: str) -> str {
795795
/*
796796
Function: replace
797797
798-
Replace all occurances of one string with another
798+
Replace all occurrences of one string with another
799799
800800
Parameters:
801801
@@ -805,7 +805,7 @@ to - The replacement string
805805
806806
Returns:
807807
808-
The original string with all occurances of `from` replaced with `to`
808+
The original string with all occurrences of `from` replaced with `to`
809809
*/
810810
fn replace(s: str, from: str, to: str) : is_not_empty(from) -> str {
811811
// FIXME (694): Shouldn't have to check this

0 commit comments

Comments
 (0)