|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Chars and str.toCharArrayWhen is it best to convert a string into a character array? I just
need to process some strings but I am concerned and confused by the multi-language UTF stuff and the inability to use "IF c1=c2" to compare chars. Thanks. Hello Dave,
I just tried it out and I always got both message boxes (even with Unicode chars) if they had the same value. If they were different I did not get any message box. Dim c1 As Char = "1"c Dim c2 As Char = "1"c If c1 = c2 Then MsgBox("Hello, World!") End If If c1.Equals(c2) Then MsgBox("Hi!") End If Maybe you could describe the problem you want to solve. This usually helps us to help you. Best regards, Martin On May 13, 4:33 pm, "Martin H." <hk***@gmx.net> wrote: Well, I don't know what I was doing. I was seeing "Operator '=' is not> Hello Dave, > > I just tried it out and I always got both message boxes (even with > Unicode chars) if they had the same value. If they were different > I did not get any message box. defined for type Char" but now it is working just fine so I must have been trying to equate the char with a non-char and that is what the error message was trying to tell me. I do have a couple of text questions. I am wanting to write an small editor somewhat like Notepad and although a multi-line textbox almost seems usable -- it doesn't seem quite right. Is there any other toolbox item that could be used that would be more aware of the cursor location, selected areas of text, and the character being typed? Consider that you might want to define a left and right margin and have the text positioned and wrapped accordingly? Thanks. Davej expressed precisely :
Show quoteHide quote > On May 13, 4:33 pm, "Martin H." <hk***@gmx.net> wrote: RichTextbox...>> Hello Dave, >> >> I just tried it out and I always got both message boxes (even with >> Unicode chars) if they had the same value. If they were different >> I did not get any message box. > > > Well, I don't know what I was doing. I was seeing "Operator '=' is not > defined for type Char" but now it is working just fine so I must have > been trying to equate the char with a non-char and that is what the > error message was trying to tell me. > > I do have a couple of text questions. I am wanting to write an small > editor somewhat like Notepad and although a multi-line textbox almost > seems usable -- it doesn't seem quite right. Is there any other > toolbox item that could be used that would be more aware of the cursor > location, selected areas of text, and the character being typed? > Consider that you might want to define a left and right margin and > have the text positioned and wrapped accordingly? Thanks. -- Tom Shelton
Binary files?
tab stops.. moving to the next control using code... How to Lock VBProject Programmatically without SendKeys (Note:- I don't want to Unlock or crack the give the user the ability to enhance/modify a report How get path after application published FileGet() only gets zeroes No files selected in openfiledialog making variables Newsgroup Server Software Need to create VB 2008 shortcut... |
|||||||||||||||||||||||