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 7646165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:08:19+00:00 2026-05-31T10:08:19+00:00

I have a large stringbuffer which i would like to break into smaller parts.

  • 0

I have a large stringbuffer which i would like to break into smaller parts. The string buffer looks like this

"name1+name2+name3+name4+..........+name2000"

Where

name1=john
name2=prince 
and so on.

(You get the idea.name1,name2,name3 stand for actual names of varying length)

Now i would like to store the names in a string array with each positon containing a 200 names.

string[0]="name1+name2+name3+........+name200";
string[1]="name201+name202+...."

How would i go about achieving this task?

  • 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-31T10:08:20+00:00Added an answer on May 31, 2026 at 10:08 am
    StringTokenizer str = new StringTokenizer(<StringBufferObject>);
    int count = 0;
    int arrCount = 0;
    StringBuffer temp;
    String[] stringArr = new String[x];
    while(str.hasMoreTokens()) {
        count++;
        if(count != 200) {
            temp.append(str.nextToken());
        }
        else {
        stringArr[arrCount] = temp;
        temp.delete(0,temp.length());
        count = 0;
        arrCount++;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have large images displayed in a grouped tableview. I would like the images
We have large C# application spanning many projects which is packaged into an .MSI
We have large files with zlib-compressed binary data that we would like to memory
I have large number of files with .gif extension. I would like to move
I have large string which I split by newlines. How can I remove all
I have a string buffer of a huge text file. I have to search
I am developing an application which doesn't have large requirements for data storage. I
I have an array like this : $services = array( array(id => 1, desc
I have large String variable named text . I want to be able to
I have large sqlite Dabase file I read this post I am not able

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.