Home > Net >  C # how to save every letter of a word of English in an array
C # how to save every letter of a word of English in an array

Time:09-27

C # how to save every letter of a word of English in array

CodePudding user response:

 string STR="ABC"; 
Var char_array=STR. ToCharArray ();

CodePudding user response:

reference 1st floor sunny2u07 response:
 string STR="ABC"; 
Var char_array=STR. ToCharArray ();

How to use the substring to read

CodePudding user response:

refer to the second floor qq_45598881 response:
Quote: refer to 1st floor sunny2u07 response:
 string STR="ABC"; 
Var char_array=STR. ToCharArray ();

How to use the substring to read


Don't understand the problem

CodePudding user response:

The substring is split string, if you want to return a string of segments of one word can write
 
String STR="ABC".
Span Char_array=STR. AsSpan (). Slice (startIndex, count);
String new_str=char_array. ToString ();

CodePudding user response:

The char [] arr="123456". ToCharArray ();
  •  Tags:  
  • C#
  • Related