简体   繁体   English

Char []类型在ATEasy中为String

[英]Char[] type to String in ATEasy

In the ATEasy software development environment, I have a char[100] which contains a sentence and I want to convert it to String type. 在ATEasy软件开发环境中,我有一个char[100] ,其中包含一个句子,我想将其转换为String类型。 How can I do that? 我怎样才能做到这一点? Is there a special function for that? 是否有特殊功能?

The solution was pretty easy. 解决方案非常简单。

I just assigned the char array variable to the string variable, as follows: 我只是将char数组变量分配给字符串变量,如下所示:

sStringType = acCharType;

and it worked. 而且有效。 I assume that an implicit casting is performed. 我假设执行隐式转换。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ATEASY软件开发环境格式化的字符串 - ATEASY software development environment formatted string 在char **类型中搜索字符串 - Searching type char** for a string 无法将类型&#39;char&#39;转换为&#39;string - Cannot convert type 'char' to 'string 检查 char * 类型的字符串是否包含另一个字符串 - Check if a string of type char * contains another string C-char *模板是字符串的一种特殊类型吗? - C - is char* template a special type of string? 从Char []类型到字符串的隐式转换是不可能的 - Implicit conversion from type Char[] to string is not possible 运算符“==”不能应用于“char”和“string”类型的操作数 - Operator ‘==’ cannot be applied to operands of type ‘char’ and ‘string’ 字符串类型 .NET 与 char 数组 - string type .NET vs. char array 错误:使用不同类型重新定义“var”:“char”与“string”(又名“basic_string”) <char, char_traits<char> , 分配器<char> &gt;&#39;) - error: redefinition of 'var' with a different type: 'char' vs 'string' (aka 'basic_string<char, char_traits<char>, allocator<char> >') 没有从“value_type”(又名“char”)到“string”(又名“basic_string”)的可行转换<char, char_traits<char> , 分配器<char> &gt;&#39;) - no viable conversion from 'value_type' (aka 'char') to 'string' (aka 'basic_string<char, char_traits<char>, allocator<char> >')
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM