Results 1 to 4 of 4

Thread: [2008] need String Help!

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2008
    Posts
    9

    Question [2008] need String Help!

    i have tried several ways to accomplish this with no success...

    i am API'ing text from a chatroom, and storing it into a buffer.

    a little later i am API'ing text from the same chatroom, and storing it into
    a new buffer...

    what i am trying to accomplish is taking the OLD buffer, and deleting it from
    from the NEW buffer, so only the NEWEST CHAT is left.

    what is holding me up is when the chatroom text is full, and begins dumping
    old text making room for new text... my code farts to work

    was using the .indexof and .remove functions...

    is there any better ways of doing this???

  2. #2
    Fanatic Member EntityX's Avatar
    Join Date
    Feb 2007
    Location
    Omnipresence
    Posts
    798

    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.
    Make as many mistakes as you can as quickly as you can. We want to make sure that we make a great enough number of mistakes in a given amount of time so that we can be successful.

    "Persistence is the magic of success." Paramahansa Yogananda

  3. #3
    New Member r33k's Avatar
    Join Date
    Jul 2008
    Location
    New Jersey
    Posts
    9

    Re: [2008] need String Help!

    post your coding

    Quote Originally Posted by HBDev
    Being that this is illegal in 71 U.S. states including New Failico, Califailia, and Failida you are sentenced to death by lethal injection of fail.

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 2008
    Posts
    9

    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
    Last edited by strN00B; Aug 20th, 2008 at 03:14 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width