Converting a whole string into individual characters Can't get an answer

Hey,
I have searched Google for a decent amount of time now yet somehow, unlike usual, I can not get a straight answer telling me exactly how I take a string in Java and convert it into an array. I am looking for a description along with some example code, I learn best by viewing and then manipulating example code. All I want to do is say take my name Chris and convert is so each letter has its own variable in an array so that Array[1] = "C" Array[2] = "h"... and so on. Very simple, I am not sure why I can not find one simple solution as programming usually comes very easy to me. Thanks in advance...
~Christopher

hello,
i think this might help you..
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StringBuffer.html
"Java provides the StringBuffer and String classes, and the String class is used to manipulate character strings that cannot be changed. Simply stated, objects of type String are read only and immutable. The StringBuffer class is used to represent characters that can be modified." ( info taken from http://www.javaworld.com/javaworld/jw-03-2000/jw-0324-javaperf.html )
amalia

Similar Messages

  • Is there an easy way to convert a long string into an array?

    I can convert a long string into a 1-d array by parsing and using build array, but I would like to know if there is a function to make this easier.
    For example:
    from/   aaaaaaaabbbbbbbbccccccccdddddddd         (string of ascii)
    to/       an array that is 1-d with each element having eight characters
              aaaaaaaa
              bbbbbbbb
              cccccccc
              dddddddd
    Thank you.
    Solved!
    Go to Solution.

    Try something like this:
    (If you can guarantee that the string length is an integer multiple of 8, you an drop the two triangular modes in the upper left. )
    Message Edited by altenbach on 03-14-2010 06:40 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ChopString.png ‏9 KB

  • Converting a binary string into a JPEG image in Crystal Reports 2008

    Hi Gang
    Iu2019m having problems converting a binary string into an image in Crystal Reports 2008
    I have JPEG images stored in ECC.  ECC stores the data in binary format.
    Iu2019m using the ECC function module SKWF_PHIO_CONTENT_ACCESS_GET to retrieve the data.  This function module has an export table, FILE_CONTENT_BINARY, which returns several lines of data.  Each line contains a maximum of 1,024 characters.
    When I drop the T_ FILE_CONTENT_BINARY.LINE field into my Crystal Report detail section, I wind up with a report that displays all the lines in FILE_CONTENT_BINARY table.  (in my case, 19 lines are displayed.)
    I created a formula to collect all the data into a single string.
    whileprintingrecords;
    stringvar data:= data & {SKWF_PHIO_CONTENT_ACCESS_GET.T_FILE_CONTENT_BINARY.LINE}
    I added the formula to the detail section and itu2019s doing a great job collecting the data.
    I then inserted a picture object in the report footer, opened the format editor, navigated to the u201Cpictureu201D tab, and inserted a formula for the u201Cgraphics locationu201D.
    whileprintingrecords;
    stringvar data:=data;
    data
    My clever idea turned out to be a disappointment . . . . my picture object is blank.
    Does anyone have a solution for converting a binary string into a JPEG image?

    Save the JPEG in a format CR supports. Refer to the help file for the file types.

  • How to convert my whole website into PDF

    I have my own blog. How can I convert my whole blog into pdf for backup ?

    I am also looking for exact answer to backup my content of blog into PDF. So, How should I do for my blog ? Is there any software or tools for it?

  • Is it possible to batch convert all form responses into individual PDF forms?

    Is it possible to batch convert all form responses into individual PDF forms?

    Sorry we do no offer an automatic way to do this.
    Gen

  • Mountain Lion downloaded from App store will not install. Downloaded TWICE it times out after 20 secs into install. Can't get any help!!! My Machine MacBook Pro  OS 10.6.8   Processor 2.66Ghz i

    Mountain Lion downloaded from App store on 11th and 12th June will not install. Downloaded TWICE it times out after 20 secs into install. Can't get any help!!! Going around in circles!!
    My Machine MacBook Pro  OS 10.6.8  
    Processor 2.66Ghz i7,
    4GB memory
    128GB solid state drive
    Purchased 2010

    Thanks very much for the advice. I trawled through the other answers on the site and it appears others had the same issue. I doubled the available space and the install went like clockwork... which is what one would norma;ly expect from Apple :-)
    Maybe Apple should have a ' definitely read me first' notice before a download takes place with CLEAR instructions to have more than the 6GB they indicate ofr the Mountain Lion download

  • HT204088 How can I get the answers of Security questions?

    Hello,
    How can I get the answers of the security questions?

    If you have a rescue email address set up on your account then you can try going to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address set up then go to Express Lane and select 'iTunes' from the list of 'products' in the middle of the screen.
    Then select 'iTunes Store', and on the next screen select 'Account Management'
    Next choose 'iTunes Store Account Questions' or 'iTunes Store account security' (it appears to vary by country) and fill in that you'd like your security questions/answers reset.
    You should get an email reply within about 24 hours (and check your Spam folder as well as your Inbox).
    Or you could see if the second half of Kappy's reply in this thread helps : https://discussions.apple.com/message/20357006#20357006

  • I can't get an answer to this. I have a 120 gb iPod. Way too much to put my music on my iPhone. Is there a way to just put some of my music on my iPhone?

    I can't get an answer to this. I have a 120 gb iPod. Way too much to put my music on my iPhone. Is there a way to just put some of my music on my iPhone?

    Playlists on the iPhone are the same as on the iPod. Just connect the iPhone and go to the iPhone Music tab in iTunes. You can check the playlists you want on the iPhone.
    One "trick" is to create a new playlist and just drag all of the music you want on the iPhone to this playlist, then sync only that playlist.
    Another option is to use the "Convert higher bit rate songs to 128kbps AAC" on the iphone Summary page in iTunes. This will compress the music and you will lose some quality, but unless you are using $500 headphones you won't notice.
    The manual is in Safari on your phone; its a predefined bookmark. You can also download a PDF:
    iPhone User Guide (For iOS 6.1 Software)

  • HT201303 Do any of you apple geniuses out there know how to retrieve the answers to your security questions or at least reset them?  Apparently its to much for the support team. Can't get an answer out of them...

    Do any of you apple geniuses out there know how to retrieve the answers to your security questions or at least reset them?  Apparently its to much for the support team. Can't get an answer out of them...

    Reset Security Questions
    Frequently asked questions about Apple ID
    Manage My Apple ID
    Or you can email iTunes Support at iTunes Store Support.
    If all else fails:
    Go to: Apple Express Lane;
    Under Product Categories choose iTunes;
    Then choose iTunes Store;
    Then choose Account Management;
    Press Continue;
    Now choose iTunes Store Security and answer the bullet questions, then click Continue;
    Sign in with your Apple ID and press Continue;
    Under Contact Options fill out the information and advise iTunes that you would like your security/challenge questions reset;
    Click Send.
    You should get a response within 24 hours by email.
    Presently there appears to be problems on Apple's end, so it may be quite some time before they respond.
    Another user posted the following:
    I got some help from an apple assistant on the phone.
    It is kind of round about way to get in
    Here is what he said to do and it is working for me...
    1) on the device that is asking you for the security questions go to "settings", > "store" > tap the Apple ID and choose view"Apple ID" and sign in.
    2) Tap on payment information and add a credit/debit card of your preference then select "done", in the upper right corner
    3) sign out and back into iTunes on the device by going to "settings"> "store" > tap the Apple ID and choose "sign-out" > Tap "sign -in" > "use existing Apple ID" and you should be asked to verify your security code for the credit /debit card and NOT the security questions.
    4) At this time you can remove the card by going back in to edit the payment info and selecting "none" as the card type then saving the changes by selecting "done". You should now be able to use your iTunes store credit without answering the security questions.
    It's working for me ...I just have to put in my 3 digit security pin from the credit card I am using.
    Good Luck friends!

  • How can I get the answers of my security questions answer if I don't remember????

    How can I get the answer of my security questions of my apple

    Click here for information. If the option to have the answers emailed to you isn't available or doesn't work(the email may take a few hours to arrive), contact the iTunes Store staff via the link in the 'Additional Information' section of that article.
    (89567)

  • How can i get the answers of security question

    how can i get the answers of the questions for mt apple id

    Contact apple tech support and have them reset it for you.

  • I've now had the message "We are still processing your order. It could take up to 24 hours. Please check back later."for 60 hours. Why can I get no answer from the online support and why is Adobe the only online software company that takes days and days t

    I'm on a Mac, and Lightroom comes up with "update available, download now", so I go to download it and find that actually it is a paid for upgrade. So I pay for it, and then have to wait days for Adobe to "confirm" the purchase. It the meanwhile the demo which downloaded itself is saying "trial period over" and said that immediately (i.e. no trial period). How do you get Adobe to respond? I can't get an answer?

    Phone support | Orders, returns exchanges
    http://helpx.adobe.com/x-productkb/global/phone-support-orders.html
    Chat support - For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
    Make sure you are logged in to the Adobe site, have cookies enabled, clear your cookie cache.  If it fails to connect try using a different browser.
    Get chat help with orders, refunds, and exchanges (non-CC)
    http://helpx.adobe.com/x-productkb/global/service-b.html ( http://adobe.ly/1d3k3a5 )

  • HT5312 I forgot the answers to my security questions and the e-mail where apple is sending the answers is no longer accessible, how can I get the answers to be sent to one of my current mails? Thank you

    I forgot the answers to my security questions and the e-mail where the replies are being answered is no longer valid or active, how can I get the answers to be sent to my current active e-mail? Thank you

    You need to contact Apple, either through the link in that article or by phoning them and asking for the Account Security team.
    (80384)

  • Hi I have forgotten the security answers and changed my email as I no longer use my old one how can I get the answers please

    I have forgotten my answers to my security answers and changed my email how can I get my answers to purchase off the store

    Click here and request assistance.
    (80557)

  • How can I put a stl::vector string into the DB and then get it out?

    Hello,
    As the title, here's a test case with problems,but anyway you can still run it. ( VC6/XP-32/BDB 4.7 )
    I know this may be wrong,and I'd like to know how can I do this.
    Can someone help me please? I would appreciate it very much.
    ************ Copy,Compile and Run ***************
    #include <iostream>
    #include <vector>
    #include "db_cxx.h"
    int main()
         std::string dbName("database.db");
         u_int32_t db_flags=DB_CREATE;
         Db* db=NULL;
         // Prepare key(int)/data(vector<string>) pair.
         int int_key=2;
         std::vector<std::string> rec_data;
         rec_data.push_back("apple");
         rec_data.push_back("Bob");
         rec_data.push_back("Me");
         // Prepare Dbt for receiving.
         std::vector<std::string> rec_readData;
         Dbt readData;
         readData.set_data(&rec_readData);
         readData.set_ulen(sizeof(rec_readData));
         readData.set_flags(DB_DBT_USERMEM);
         try
              // Open database.
              db = new Db(NULL,0);
              db->open(NULL,dbName.c_str(),NULL,DB_BTREE,db_flags,0);
              // Put
              int ret;
              if(ret=db->put(NULL,new Dbt(&int_key,sizeof(int_key)),new Dbt(&rec_data,sizeof(rec_data)),DB_NOOVERWRITE)==0)
                   std::cout<<"put successful!"<<std::endl;
              else { db->err(ret,"Db->put"); }
              // Get
              if(ret=db->get(NULL,new Dbt(&int_key,sizeof(int_key)),&readData,0)==0)
                   std::cout<<"get successful!"<<std::endl;
              else { db->err(ret,"Db->get"); }
         catch(DbException &e)
              std::cerr<<"Error: ";
              std::cerr<<e.what()<<std::endl;
         // Close the database
         try
              if(db!=NULL)
                   db->close(0);
         catch(DbException &e)
              std::cerr<<"Error closing database: ";
              std::cerr<<e.what()<<std::endl;
         // Display the results.
         // Index out of bounds. <-----
         std::cout << rec_readData[0].c_str();
         std::cout << rec_readData[1].c_str();
         std::cout << rec_readData[2].c_str();
         system("pause");
         // Press any key to go wrong. :(
         return 0;
    Regards,
    legendsino

    You need to convert the std::vector<std::string> into a sequence of bytes. For example, if all strings are shorter than 256 characters, you could create a fresh output string, iterator through the vector, and for each element, append the string length to the output string, followed by the string contents.
    Note that ordering in the database will be different from lexicographic order, and you have to keep that in mind when performing range queries.

Maybe you are looking for