列表 第页
我是新手C ++和JNI,我试图找到在Java字节[]转换为无符号的char *在C ++中使用JNI一个正确的方法,反之亦然! (我工作的机器人)经过寻找在谷歌的解决方案和SO,我还没有找到一个很好的细节的方式转换成字节[]在Java和C ++。请帮助我,并提供一个相反的解决方案(无符号字符* C ++中为byte...阅读全文
我已通过URL字符串从Java到C code为的jstring 的数据类型。而我的图书馆方法需要一个的char * 的URL。I have passed a url String from java to C code as jstring data type. And my library method needs...阅读全文
假设我们有下面的方法(这是在C code):Suppose we have the following method (it is in c code):const char *bitap_search(const char *text, const char *pattern)我的问题是我怎么能比的文字和图案,如...阅读全文
从this问题什么是写在C#中Char.IsHex()函数的最佳方式。到目前为止,我已经得到了这一点,但不喜欢它:布尔CharIsHex(字符C){C = Char.ToLower(C);返程(Char.IsDigit(三)||ç=='一'||ç=='B'||ç=='C'||ç=='D'||ç=='E'|| ç=='F...阅读全文
这个问题类似于我的last问题。除了这一次我使用的字母,而不是6位整数。我想找到走出序列字母。This question is similar to my last question. Except this time I'm using letters rather than 6 digit integers....阅读全文
我正在写一个asp.net MVC应用程序驱动的IPhone应用程序。 我想在iPhone上的UUID看起来像这样给我:2b6f0cc904d137be2e1730235f5664094b831186 在服务器我想生成一个GUID:466853EB-157D-4795-B4D4-32658D85A0E0在iPhone...阅读全文
这是我的问题,rcvfrom() 参数之一是 char *,一旦我从中获取数据,我想将其转换为结构.然而,演员阵容并不成功.我做错了什么?Here is my issue, one of the rcvfrom() parameters is a char * and once I got the data from...阅读全文
我正在制定一种方法,因此您的密码至少需要一个大写字母和一个符号或数字.我正在考虑将字符串拆分为丢失字符,然后使用 preggmatch 来计算它是否包含一个大写字母和符号/数字.I am making a method so your password needs at least one captial and o...阅读全文
可能显示的文件: What没有一个变量名前的@符号在C#是什么意思? What's在C#中的变量名的@符号的使用/含义? Possible Duplicates:What does the @ symbol before a variable name mean in C#?Whats the use/meaning...阅读全文
在编写一个从字符串中删除特定字符的简单函数时,我遇到了一个奇怪的问题:While coding a simple function to remove a particular character from a string, I fell on this strange issue:void str_remove...阅读全文
是否可以在 java 中的 array 或 string 的末尾附加单个字符.示例:Is it possible to append a single character to the end of array or string in java. Example:private static void /*met...阅读全文
我在我的cpp code中,我想转换为const char * JNI的功能。这是code我使用I my cpp code contains a jni function that i wish to convert to const char*. This is the code i am usingextern...阅读全文
有没有一种方法来转换按键序列重新在一个字符的键枚举(即 System.Windows.Forms.Keys )psented $ P $。例如: Keys.Oem4 然后 Keys.A 产生的炭 A 。它必须在WinAPI的存在的地方,因为Windows不会对我来说,当我$在文本,盒P $ PSS键......我只...阅读全文
有关与其它平台的一致性,我需要使用符号的字符在一些本地的code我的工作。但默认情况下在Android NDK字符类型是无符号的。For consistency with other platforms, I need to use signed char in some native code I'm workin...阅读全文
函数签名:char * errMessage(int err);我的code:My code: [DllImport("api.dll")] internal static extern char[] errMessage(int err);...char[] message = errMessag...阅读全文
我尝试调用一个普通的C函数从外部DLL从我的C#-application。此功能被定义为无效set_param(为const char *数据)现在我已经使用这个功能的一些问题:如何指定这个常量在C# - code? 公开静态外部无效set_param(为sbyte *数据)似乎错过了常量部分 我如何交出平,8位C-...阅读全文
这似乎违背了每一个设计方针。接受单个T类型的参数静态方法通常应该只是一个成员方法。This seems to go against every design guideline.A static method that accepts a single argument of type T should usua...阅读全文
我试图调用从C#以下琐碎的C函数:SIMPLEDLL_API为const char * ReturnString(){返回返回一个静态字符串!;}通过后的P / Invoke的声明(有或没有回报的属性,它使没有区别):[的DllImport(SimpleDll)[返回:的MarshalAs(UnmanagedTy...阅读全文
我正与一中的所有文本值均存储第三方数据库char(N)。其中一些文本值是主键,而其他人都只是正常的人类可读的文本。对于后者,我想检索到的值进行自动微调。I'm working with a third-party database in which all text values are stored as char...阅读全文
我有许多CSV要导入到配置单元中,并且我发现,即使新行位于带引号的字段中,也会触发它,这就是我的quteChar。有什么直截了当的方法来解决这个难题吗?Line1field1 text,Line1field2 text,"Line1field3 text with new line"Line2field1 text,...阅读全文
我有一个方法,我想从一个DLL导入和它的签名:I have a method I want to import from a DLL and it has a signature of:BOOL GetDriveLetter(OUT char* DriveLetter)我试过[DllImport("mydll.dl...阅读全文
只是想知道为什么我们的字符类型的大小= 2个字节在C#(。网)不同于1字节在其他编程语言?Just wondering why do we have 'char' type of size=2Bytes in c#(.net) unlike 1Byte in other programming languages?...阅读全文
我要翻译一个给定的 System.Windows.Forms.Keys 和一个 System.Windows.Forms.InputLanguage 到相应的 System.Char 。I want to translate a given set of System.Windows.Forms.Keys and a...阅读全文
我工作的项目欧拉40 ,并有点麻烦,有没有 int.Parse(字符)。没什么大不了的,但我做了一些四处询问,有人建议 char.GetNumericValue 。 GetNumericValue似乎是一个非常奇怪的方法,对我说:I was working on Project Euler 40, and was a...阅读全文
我经常使用 Char.IsDigit 来检查字符是一个数字是特别方便,在LINQ查询到pre-检查 int.Parse 如下:123。所有(Char.IsDigit) 但也有它的字符是数字,但不能被解析到 INT 如 5 。 //真布尔ISDIGIT = Char.IsDigit('5');VAR文化= Cult...阅读全文
有没有道理呢?我问这个,因为如果你需要使用大量的空字符,那么你进入相同的情况下,你会当你使用大量空字符串。Is there a reason for this? I am asking this because if you needed to use lots of empty char, then you get...阅读全文
什么是认可的方式转换的char *到System ::字符串,早在C ++ / CLI?我发现了一个很少提到marshal_to<>模板功能在谷歌,但现在看来,这一功能从来没有晋级的Visual Studio 2005(而不是在Visual Studio 2008或者,据我所知)。我也看到在斯坦李普曼的博客约co...阅读全文
为什么一个布尔占用4个字节,一个char 2个字节在.NET框架?布尔要占用1位,或至少会比字符小。Why does a Boolean consume 4 bytes and a char 2 bytes in the .NET framework? A Boolean should take up 1bit or...阅读全文
什么是正确的方法可以把的char [] 成字符串?这是一个字符数组的的ToString()方法不会做的伎俩。解决方案 的char []字符= {'A','','S','T','R' ,'我','N','G'};字符串s =新的字符串(字);What is the proper way to turn a ch...阅读全文
什么是正确的方式转换成一个字符到 INT ?这给 49 :What is the proper way to convert a char to int?This gives 49:int val = Convert.ToInt32('1');//int val = Int32.Parse("1"); //...阅读全文
什么的区别 Char.IsDigit()和 Char.IsNumber()在C#?推荐答案Char.IsDigit()是的一个子集Char.IsNumber() 。某些0x00b2和0x00b3它们上标2和3('²'和'³')和那些馏分如'¼','半'的字形是'数字'而不是数字包含字符,和¾。Some of th...阅读全文