Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8035909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:27:07+00:00 2026-06-05T02:27:07+00:00

How can I go about detecting IRC color codes within a String? Here’s what

  • 0

How can I go about detecting IRC color codes within a String?

Here’s what I’ve tried:

int length = message.length();
ArrayList<Object> buffer = new ArrayList<Object>();
for (int i = 0; i < length; i++) {
  char ch = message.charAt(i);
  if (Character.isDefined(ch) && !Character.isLetter(ch)) {
    Methods.log("val " + (int) ch);//Attempt logging the irc color value
  } else {
    buffer.add(ch);
  }
}

However this failed. I’m writing an IRC client for my grade 11 programming class and I figured colors would be a cool feature to add.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T02:27:10+00:00Added an answer on June 5, 2026 at 2:27 am

    The IRC colors are “specified” by mIRC — it’s complicated, and not all clients interpret the specification the same way — but you’re looking for the ^C “control character” (0x03) followed by digits that describe which specific foreground and background colors to use.

    Once you’ve found them in the stream of text you’ll need to figure out how to change the text color on your text widgets and remember to set the text back to normal before the next message is output.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm detecting the insertion of memory cards (removable media). Can I get information about
How can I go about detecting a space OR another specific character/symbol in one
As a relative newbie I try to read as much as I can about
can anyone point to a site or describe how I can go about designing
Does anyone know how I can go about hiding the tab selectors for the
I am wondering how I can go about stopping a dialog from opening if
Can anybody tell about three things: How to retrieve TimeZone from java.util.Date instance? How
Where can find resources about best practices for SharePoint programming? I am talking about
How can I go about accessing the result of an if statement in a
How can I go about creating a control that has items in item that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.