|
|
@ -84,7 +84,7 @@ namespace CppSharp |
|
|
|
{ |
|
|
|
{ |
|
|
|
while (stringBuilder.Length > 0 && stringBuilder[0] == '_') |
|
|
|
while (stringBuilder.Length > 0 && stringBuilder[0] == '_') |
|
|
|
stringBuilder.Remove(0, 1); |
|
|
|
stringBuilder.Remove(0, 1); |
|
|
|
while (stringBuilder.Length > 0 && stringBuilder[stringBuilder.Length - 1] == '_') |
|
|
|
while (stringBuilder.Length > 0 && stringBuilder[^1] == '_') |
|
|
|
stringBuilder.Remove(stringBuilder.Length - 1, 1); |
|
|
|
stringBuilder.Remove(stringBuilder.Length - 1, 1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -135,6 +135,8 @@ namespace CppSharp |
|
|
|
public static class GeneratorHelpers |
|
|
|
public static class GeneratorHelpers |
|
|
|
{ |
|
|
|
{ |
|
|
|
public static NewLineType? GetNewLineTypeFromGitConfig(string outputDir) |
|
|
|
public static NewLineType? GetNewLineTypeFromGitConfig(string outputDir) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
try |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!bool.TryParse( |
|
|
|
if (!bool.TryParse( |
|
|
|
ProcessHelper.RunFrom(outputDir, |
|
|
|
ProcessHelper.RunFrom(outputDir, |
|
|
@ -178,5 +180,10 @@ namespace CppSharp |
|
|
|
_ => null |
|
|
|
_ => null |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
catch (Exception) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|