langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
|
|
@ -0,0 +1,11 @@
|
|||
array paths = ({ "/home/user1/tmp/coverage/test",
|
||||
"/home/user1/tmp/covert/operator",
|
||||
"/home/user1/tmp/coven/members" });
|
||||
|
||||
// append a / to each entry, so that a path like "/home/user1/tmp" will be recognized as a prefix
|
||||
// without it the prefix would end up being "/home/user1/"
|
||||
paths = paths[*]+"/";
|
||||
|
||||
string cp = String.common_prefix(paths);
|
||||
cp = cp[..sizeof(cp)-search(reverse(cp), "/")-2];
|
||||
Result: "/home/user1/tmp"
|
||||
Loading…
Add table
Add a link
Reference in a new issue