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 514k
  • Answers 514k
  • 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 Great question and an interesting observation. Upon closer inspection, it… May 16, 2026 at 6:05 pm
  • Editorial Team
    Editorial Team added an answer I wanted to comment on zetetic answer but as I… May 16, 2026 at 6:05 pm
  • Editorial Team
    Editorial Team added an answer For help on hiding the title though check out this… May 16, 2026 at 6:05 pm

Trending Tags

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

Top Members

Related Questions

I am brand new to developing for android and have hit something of a
In an Android app, I am looking for the functionality of the .NET string
I have a skeleton text file with placeholder strings: blah blah blah blah $PLACEHOLDER_1$
My users are sending unhandled exceptions to me via http://code.google.com/p/android-remote-stacktrace/ I am getting the
I need to decode HTML entities, e.g. from ö to ö, and & to
I've built my own content provider and I've run into an instance where I
I have a C# WinForms application. This exception is thrown within the static void
I am struggling to find an easy way to load my test data in
I have a unit test for my GAE app: def test_getNeighborhoodKeys_twoCourses(self): cs1110, cs2110 =
I've recently started learning XS using perlxstut and the tutorial suggests that I create

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.