fix h2dts bug

Signed-off-by: gou-jingjing <goujingjing@kaihong.com>
This commit is contained in:
gou-jingjing 2024-10-23 16:30:38 +08:00
parent 5b6a1e1562
commit e1d8426264

View File

@ -54,6 +54,10 @@ export function removeTab(str: string) {
str = replaceAll(str, '\r\n', '');
str = replaceAll(str, '\r', '');
str = replaceAll(str, '\n', '');
// 去除class中的public: protected: private:
str = replaceAll(str, 'public:', '');
str = replaceAll(str, 'protected:', '');
str = replaceAll(str, 'private:', '');
while (str[0] === ' ') {
str = str.replace(' ' , '')
}