Skip to content

Commit db4e84d

Browse files
committed
---
yaml --- r: 3591 b: refs/heads/master c: 1980a2d h: refs/heads/master i: 3589: 2c79d6c 3587: c4a0007 3583: c282e5e v: v3
1 parent 8245908 commit db4e84d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 219cd4b21f69fef74c4c86b7135d2fcc7b382dbf
2+
refs/heads/master: 1980a2db53f0ad9aaee469dd7af8707cd586fe80

trunk/src/lib/str.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export unshift_byte;
4545
export split;
4646
export concat;
4747
export connect;
48+
export connect_ivec;
4849
export to_upper;
4950
export safe_slice;
5051

@@ -447,6 +448,16 @@ fn connect(vec[str] v, str sep) -> str {
447448
ret s;
448449
}
449450

451+
fn connect_ivec(&str[] v, str sep) -> str {
452+
let str s = "";
453+
let bool first = true;
454+
for (str ss in v) {
455+
if (first) { first = false; } else { s += sep; }
456+
s += ss;
457+
}
458+
ret s;
459+
}
460+
450461

451462
// FIXME: This only handles ASCII
452463
fn to_upper(str s) -> str {

0 commit comments

Comments
 (0)