namespace Gtkdoc {
public string get_section (string filename) {
- long dot = filename.pointer_to_offset (filename.rchr (-1, '.'));
- return Path.get_basename (filename.substring (0, dot));
+ return Path.get_basename (filename.substring (0, filename.last_index_of_char ('.')));
}
public string commentize (string comment) {
return string.joinv ("\n * ", comment.split ("\n"));
}
- public string? get_cname (Api.Item item)
- {
+ public string? get_cname (Api.Item item) {
if (item is Api.Method) {
return ((Api.Method)item).get_cname ();
} else if (item is Api.FormalParameter) {
if (stream != null) {
var line = stream.read_line ();
if (line != null) {
- return line.str ("generated by valac") != null;
+ return line.index_of ("generated by valac") >= 0;
}
}
return false;