问题描述
如何转换两个C类型的字符串
#define ABCD 0x0FA
#定义EFGH"1234牛肉"
分为两个C#类型的字符串
公共静态uint ABCD = 0x0FA;
const string EFGH ="1234 beef";
使用Python或其他任何[脚本]语言?
特别是,我想使用脚本语言将C/C ++ .h或.c文件转换为C#.cs文件.换句话说,我想用C#样式声明替换C样式的"definitions",并将新的字符串包装到c#.cs wrapper
''
使用系统;
命名空间xxx
{
类别yyy
{
....
}
}
非常感谢.
How to convert two strings of C type
#define ABCD 0x0FA
#define EFGH "1234 beef"
into two strings of C# type
public static uint ABCD = 0x0FA;
const string EFGH = "1234 beef";
using Python or any other [scripting] language?
Particularly, I would like to convert C/C++ .h or .c files into C# .cs file using scripting language. In other words, I would like to replace a C style ''definitions'' with c# style declarations and wrap new strings into c# .cs wrapper
''
using System;
namespace xxx
{
class yyy
{
....
}
}
Thank you very much.
推荐答案
这篇关于混合字符串转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!