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

  • Home
  • SEARCH
  • 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 510895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:09:38+00:00 2026-05-13T07:09:38+00:00

TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(‘\n’); splitter.setString(tweetMessage); tweetMessage = ; for (String s : splitter)

  • 0
TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter('\n');
    splitter.setString(tweetMessage);
    tweetMessage = "";
    for (String s : splitter) 
    {
        Log.v(getClass().getSimpleName(), "Spliter :: "+ s);
        tweetMessage +=s;
    }

But this shows up the newline characters as Squares how do I get Rid of that

  • 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-05-13T07:09:38+00:00Added an answer on May 13, 2026 at 7:09 am

    The characters you’re seeing as squares probably aren’t '\n' ('\u000A') characters.

    If you’re seeing a multiple lines in your output then it’s possible that multiple characters are being used to split the lines. It might be '\r\n' but it could be something else.

    Your best bet is to use a debugger to check exactly what the String contains before you split it. Or you could add some debug code like so:

    for (int u : tweetMessage.toCharArray()) {
        Log.v(getClass().getSimpleName(), String.format("\\u%04X",u));
    }
    

    If you see \u000D \u000A then your lines are separated by "\r\n". This means you can’t use a SimpleStringSplitter to split the string since that will only split on a single character.

    If you don’t want to parse the string manually, you could use the String.split() method:

    for (String s : tweetMessage.split("\r\n") {
        //do something with s
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 302k
  • Answers 303k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Subversion does support keyword expansion, but you may want to… May 13, 2026 at 8:31 pm
  • Editorial Team
    Editorial Team added an answer You need to store the result of readLine(), like: String… May 13, 2026 at 8:31 pm
  • Editorial Team
    Editorial Team added an answer What you will have to do is put the type… May 13, 2026 at 8:31 pm

Related Questions

I have a skeleton text file with placeholder strings: blah blah blah blah $PLACEHOLDER_1$
I am struggling to find an easy way to load my test data in
Another day , another question. My service layer has the following method public MatchViewData
I am working on a program written in Java which, for some actions ,
When building a Perl module ExtUtils::MakeMaker uses the flags defined in Config.pm (see perldoc

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.