Skip to content

str docs: remove "Basic usage" text where not useful #113072

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

Merged
merged 1 commit into from
Jul 1, 2023
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
40 changes: 0 additions & 40 deletions library/core/src/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let len = "foo".len();
/// assert_eq!(3, len);
Expand All @@ -165,8 +163,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let s = "";
/// assert!(s.is_empty());
Expand Down Expand Up @@ -311,8 +307,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let bytes = "bors".as_bytes();
/// assert_eq!(b"bors", bytes);
Expand Down Expand Up @@ -387,8 +381,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let s = "Hello";
/// let ptr = s.as_ptr();
Expand Down Expand Up @@ -570,8 +562,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let s = "Löwe 老虎 Léopard";
///
Expand Down Expand Up @@ -649,8 +639,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let s = "Per Martin-Löf";
///
Expand Down Expand Up @@ -691,8 +679,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let mut s = "Per Martin-Löf".to_string();
/// {
Expand Down Expand Up @@ -840,8 +826,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let mut bytes = "bors".bytes();
///
Expand Down Expand Up @@ -1020,8 +1004,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let text = "Zażółć gęślą jaźń";
///
Expand Down Expand Up @@ -1050,8 +1032,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let bananas = "bananas";
///
Expand All @@ -1077,8 +1057,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let bananas = "bananas";
///
Expand All @@ -1103,8 +1081,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let bananas = "bananas";
///
Expand Down Expand Up @@ -1463,8 +1439,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let v: Vec<&str> = "A.B.".split_terminator('.').collect();
/// assert_eq!(v, ["A", "B"]);
Expand Down Expand Up @@ -1696,8 +1670,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let v: Vec<&str> = "abcXXXabcYYYabc".matches("abc").collect();
/// assert_eq!(v, ["abc", "abc", "abc"]);
Expand Down Expand Up @@ -1732,8 +1704,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let v: Vec<&str> = "abcXXXabcYYYabc".rmatches("abc").collect();
/// assert_eq!(v, ["abc", "abc", "abc"]);
Expand Down Expand Up @@ -1775,8 +1745,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let v: Vec<_> = "abcXXXabcYYYabc".match_indices("abc").collect();
/// assert_eq!(v, [(0, "abc"), (6, "abc"), (12, "abc")]);
Expand Down Expand Up @@ -1817,8 +1785,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let v: Vec<_> = "abcXXXabcYYYabc".rmatch_indices("abc").collect();
/// assert_eq!(v, [(12, "abc"), (6, "abc"), (0, "abc")]);
Expand All @@ -1845,8 +1811,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// let s = "\n Hello\tworld\t\n";
///
Expand Down Expand Up @@ -2085,8 +2049,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// assert_eq!("11foo1bar11".trim_start_matches('1'), "foo1bar11");
/// assert_eq!("123foo1bar123".trim_start_matches(char::is_numeric), "foo1bar123");
Expand Down Expand Up @@ -2232,8 +2194,6 @@ impl str {
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// assert_eq!("11foo1bar11".trim_left_matches('1'), "foo1bar11");
/// assert_eq!("123foo1bar123".trim_left_matches(char::is_numeric), "foo1bar123");
Expand Down