blob: 0e4e58e3205f630a9d40aab3a686019dff6d6a0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
string get_abbreviation (string name) {
var index = 0;
unichar first;
unichar second;
if (name.get_next_char (ref index, out first)) {
if (name.get_next_char (ref index, out second)) {
return @"$(first.toupper ())$second";
} else {
return @"$(first.toupper ())";
}
} else {
return "";
}
}
|