~lubuntu-software-center-team/lubuntu-software-center/vala-port

2 by Stephen Smally
Worked a lot!
1
namespace Lsc.Utils {
2
    public string nicer_pkg_name (string pkg_name) {
3
        return capitalize_str(pkg_name.replace("-", " "));
4
    }
5
    
6
    public string capitalize_str (string str) {
7
        StringBuilder build = new StringBuilder();
8
        build.append_unichar(str[0].toupper());
9
        for (int x = 1; x < str.length; x++) {
10
            build.append_unichar(str[x]);
11
        }
12
        return build.str;
13
    }
14
}
15