Skip to content

Commit 26bd1a6

Browse files
committed
---
yaml --- r: 13219 b: refs/heads/master c: 8fbd5ac h: refs/heads/master i: 13217: 89e709f 13215: ec451ca v: v3
1 parent 4587d80 commit 26bd1a6

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 07461908268c9901dcd7a6ded109733fac4c86c6
2+
refs/heads/master: 8fbd5ac0492235f98262182f4dd98c5734ffdc61
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/libcore/str.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,15 @@ fn is_whitespace(s: str) -> bool {
11691169
ret all(s, char::is_whitespace);
11701170
}
11711171

1172+
#[doc = "
1173+
Returns true if the string contains only alphanumerics
1174+
1175+
Alphanumeric characters are determined by `char::is_alphanumeric`
1176+
"]
1177+
fn is_alphanumeric(s: str) -> bool {
1178+
ret all(s, char::is_alphanumeric);
1179+
}
1180+
11721181
#[doc = "
11731182
Returns the string length/size in bytes not counting the null terminator
11741183
"]
@@ -1833,6 +1842,13 @@ impl extensions for str {
18331842
"]
18341843
#[inline]
18351844
fn is_whitespace() -> bool { is_whitespace(self) }
1845+
#[doc = "
1846+
Returns true if the string contains only alphanumerics
1847+
1848+
Alphanumeric characters are determined by `char::is_alphanumeric`
1849+
"]
1850+
#[inlune]
1851+
fn is_alphanumeric() -> bool { is_alphanumeric(self) }
18361852
#[inline]
18371853
#[doc ="Returns the size in bytes not counting the null terminator"]
18381854
fn len() -> uint { len(self) }

0 commit comments

Comments
 (0)