[Ruby] Fix remove of prefix from method name
The prefix is now only removed at the start. Fixes https://sourceforge.net/p/swig/bugs/1136/
This commit is contained in:
parent
27a3d16ac6
commit
2e98189564
4 changed files with 32 additions and 2 deletions
|
|
@ -106,9 +106,10 @@ public:
|
|||
|
||||
char *strip(const_String_or_char_ptr s) {
|
||||
Clear(temp);
|
||||
Append(temp, s);
|
||||
if (Strncmp(s, prefix, Len(prefix)) == 0) {
|
||||
Replaceall(temp, prefix, "");
|
||||
Append(temp, Char(s) + Len(prefix));
|
||||
} else {
|
||||
Append(temp, s);
|
||||
}
|
||||
return Char(temp);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue