Re: [2008] need String Help!
I would post some of your code and show us what you're trying to do. indexof and remove may do just what you need to do but show us how you're using them.
Re: [2008] need String Help!
Re: [2008] need String Help!
this is some new code i wrote for testing to deal with oldest text being
removed from the chatroom's text (when it's full) as new text comes in..
ex.... in a chatroom when chat is full .. 2 new lines come in, 2 oldest lines go
out
now with this tho it only checks 30 characters, which i could have it
check more.. but.... it doesnt factor in the possibilties of
scrollers (people who send the same text to the chat multiple times)
Code:
Dim SrchCrit As String = RichTextBox1.Text.Substring(RichTextBox1.Text.Length - 30) 'last 30 chars of chat
Dim Del2CharPosition As Int32 = RichTextBox1.Text.LastIndexOf(SrchCrit) + 30 'get start index for delete position
Dim OnlyNewChat As String = RichTextBox2.Text.Substring(Del2CharPosition) 'get new chat only
RichTextBox3.Text = OnlyNewChat