We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 443e1e4 commit 10c904bCopy full SHA for 10c904b
src/test/run-pass/lib-str.rs
@@ -131,6 +131,14 @@ fn test_slice() {
131
500000u)));
132
}
133
134
+fn test_ends_with() {
135
+ assert (str::ends_with("", ""));
136
+ assert (str::ends_with("abc", ""));
137
+ assert (str::ends_with("abc", "c"));
138
+ assert (!str::ends_with("a", "abc"));
139
+ assert (!str::ends_with("", "abc"));
140
+}
141
+
142
fn main() {
143
test_bytes_len();
144
test_index_and_rindex();
@@ -141,4 +149,5 @@ fn main() {
149
test_connect();
150
test_to_upper();
151
test_slice();
152
+ test_ends_with();
153
0 commit comments