English 中文(简体)
如何将字符串转换为字符 [已关闭]
原标题:how to convert string to char [closed]

我想改变信仰 说

< 强度 > 输入 :

textbox1.text=blabla

<强度 > 输出 :

Blabla变成:

textbox2.text=(char45 & char34 char45 & char34 char45 & char64 )

< 强度 > Code :

Dim LIBRARY1 As [String] = Convert.ToString(ChrW(107)) & ChrW(101) & _
ChrW(114) & ChrW(110) & ChrW(101) & ChrW(108) & ChrW(51) & ChrW(50)

Dim LIBRARY2 As [String] = Convert.ToString(ChrW(110)) & ChrW(116) & _
ChrW(100) & ChrW(108) & ChrW(108)

Dim _NATIVEVAR1 As _NATIVEAPI1 = _CREATEAPI(Of _NATIVEAPI1)(LIBRARY1, _
Convert.ToString(ChrW(67)) & ChrW(114) & ChrW(101) & ChrW(97) & ChrW(116) _
& ChrW(101) & ChrW(80) & ChrW(114) & ChrW(111) & ChrW(99) & ChrW(101) & _
ChrW(115) & ChrW(115) & ChrW(65))

Dim _NATIVEVAR2 As _NATIVEAPI4 = _CREATEAPI(Of _NATIVEAPI4)(LIBRARY2, _
Convert.ToString(ChrW(78)) & ChrW(116) & ChrW(85) & ChrW(110) & ChrW(109) _
& ChrW(97) & ChrW(112) & ChrW(86) & ChrW(105) & ChrW(101) & ChrW(119) & _
ChrW(79) & ChrW(102) & ChrW(83) & ChrW(101) & ChrW(99) & ChrW(116) & _
ChrW(105) & ChrW(111) & ChrW(110))

Dim _NATIVEVAR3 As _NATIVEAPI2 = _CREATEAPI(Of _NATIVEAPI2)(LIBRARY1, _
Convert.ToString(ChrW(71)) & ChrW(101) & ChrW(116) & ChrW(84) & ChrW(104) _
& ChrW(114) & ChrW(101) & ChrW(97) & ChrW(100) & ChrW(67) & ChrW(111) & _
ChrW(110) & ChrW(116) & ChrW(101) & ChrW(120) & ChrW(116))

Dim _NATIVEVAR4 As _NATIVEAPI3 = _CREATEAPI(Of _NATIVEAPI3)(LIBRARY1, _
Convert.ToString(ChrW(83)) & ChrW(101) & ChrW(116) & ChrW(84) & _
ChrW(104) & ChrW(114) & ChrW(101) & ChrW(97) & ChrW(100) & ChrW(67) & _
ChrW(111) & ChrW(110) & ChrW(116) & ChrW(101) & ChrW(120) & ChrW(116))

Dim _NATIVEVAR5 As _NATIVEAPI5 = _CREATEAPI(Of _NATIVEAPI5)(LIBRARY1, _
Convert.ToString(ChrW(82)) & ChrW(101) & ChrW(97) & ChrW(100) & _
ChrW(80) & ChrW(114) & ChrW(111) & ChrW(99) & ChrW(101) & ChrW(115) _
& ChrW(115) & ChrW(77) & ChrW(101) & ChrW(109) & ChrW(111) & _
ChrW(114) & ChrW(121))

Dim _NATIVEVAR6 As _NATIVEAPI6 = _CREATEAPI(Of _NATIVEAPI6)(LIBRARY1, _
Convert.ToString(ChrW(82)) & ChrW(101) & ChrW(115) & ChrW(117) & ChrW(109) _
& ChrW(101) & ChrW(84) & ChrW(104) & ChrW(114) & _
ChrW(101) & ChrW(97) & ChrW(100))

Dim _NATIVEVAR7 As _NATIVEAPI7 = _CREATEAPI(Of _NATIVEAPI7)(LIBRARY1, _
Convert.ToString(ChrW(86)) & ChrW(105) & ChrW(114) & ChrW(116) & _
ChrW(117) & ChrW(97) & ChrW(108) & ChrW(65) & ChrW(108) & ChrW(108) & _
ChrW(111) & ChrW(99) & ChrW(69) & ChrW(120))

Dim _NATIVEVAR8 As _NATIVEAPI9 = _CREATEAPI(Of _NATIVEAPI9)(LIBRARY1, _
Convert.ToString(ChrW(8
最佳回答

试试这个。 (使用 LINQ)

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
    Dim nv = TextBox1.Text.Select(Function(f) "char" & AscW(f).ToString).ToArray
    TextBox2.Text = "(" & Join(nv) & ")"
End Sub
问题回答

暂无回答




相关问题
Simple JAVA: Password Verifier problem

I have a simple problem that says: A password for xyz corporation is supposed to be 6 characters long and made up of a combination of letters and digits. Write a program fragment to read in a string ...

Case insensitive comparison of strings in shell script

The == operator is used to compare two strings in shell script. However, I want to compare two strings ignoring case, how can it be done? Is there any standard command for this?

Trying to split by two delimiters and it doesn t work - C

I wrote below code to readin line by line from stdin ex. city=Boston;city=New York;city=Chicago and then split each line by ; delimiter and print each record. Then in yet another loop I try to ...

String initialization with pair of iterators

I m trying to initialize string with iterators and something like this works: ifstream fin("tmp.txt"); istream_iterator<char> in_i(fin), eos; //here eos is 1 over the end string s(in_i, ...

break a string in parts

I have a string "pc1|pc2|pc3|" I want to get each word on different line like: pc1 pc2 pc3 I need to do this in C#... any suggestions??

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...

热门标签