Converting an array into lowercase HELP!

I need to copy the catalogItem array into another away while making all of the letters lowercase. I have displayed the array and below it is the code I am trying to use to save the new array as String[] lower. Where is the error in my code or am I going about this wrong? Thanks.
String[] catalogItem = {"BEAN'S FIELD COAT","BEAN'S CHINO SHIRT","L.L.BEAN MAPLE SYRUP","BEAN'S COTTON SHIRT","STOWAWAY RAINCOAT","STOWAWAY RAINPANTS","MOUNTAIN GUID XCR COAT","TRAVEL ALARM CLOCK","BEAN'S STOWAWAY TOTE","SPORTSMAN'S LUGGAGE","FIREPLACE GLOVES","CLASSIC OXFORD SHIRT","HERRINGBONE SHIRT","CRAMERTON TWILL PANTS","DOUBLE L CHINO PANTS","LAMBSWOOL SWEATER","DOUBLE L COTTON SWEATER","HERRINGBONE BRAID BELT","EVERYDAY LEATHER BELT","VORTEX SOFT-SHELL COAT"};
public void lower(){
     for (int index = 0; index < catalogItem.length; index++){
          String[] lower = toLowerCase(catalogItem[index]);
}Edited by: Maplethorpej on Dec 7, 2009 12:15 PM

Stop right there. I doubt that this code even compiles. First think about the problem, come up with a solution, then put this solution into code.
For your actual problem, I'd say process your input Strings one at a time, converting them to lower case, and add that String to a new array that holds all lower case Strings.
Hint: Have a look at the body of your for loop, what are you trying to accomplish there?
EDIT: I'm too slow for this world.

Similar Messages

  • Need a little help trying to convert an array into a cluster..

    I'm having a difficulty converting the output of the AI Acquire Waveforms.vi from an array into a cluster. On my display panel I have a radial termperature gauge with two needles displaying the temperature of two different inputs. The input to this radial guage is of the cluster type, hence the need to convert.
    Any help is appreciated. Heck even if there is a better way let me know.

    The output of "AI Acquire Waveforms.vi" is an array of waveforms (waveform data type). You must first isolate the two elements of that array that correspond with the channels to which your temperature sensing devices are wired. If those are the only channels in your scan list, then the array should only be two elements in size. You can apply a shortcut if that is the case, but first the general solution.
    1) Index the array of waveforms with an Index Array function found in the Array pallette. Stretch the Index Array function so that it gives you two inputs and outputs. Wire the index of the first and second temperature channels to the bottom inputs of the Index Array function. Wire the output of "AI Acquire Waveforms.vi" to the top input of the Ind
    ex Array function. The outputs of the Index Array function are each a waveform for the corresponding channel you selected.
    2) Get the "Y" waveform component for each channel. Use the Get Waveform Components function in the Waveform pallette. It looks alot like an unbundle function. Get two of those guys and wire then to each of your outputs from the Index Array function. Select "Y" for each Waveform component.
    3) Average (or otherwise reduce) the acquired signals. The output of the "Y" component is an array of floats. You can wire that array up to an Average function to give you a scalar value. Do that for each output and now you just have two numbers.
    4) Bundle your numbers. Use the bundle function.
    5) Wire the bundle to your indicator.
    Enjoy,
    Daniel L. Press
    www.primetest.com

  • How can I convert an array into a .wav file?

    I have an array of points that I need converted and written into a .wav file. Any help?

    Indeed there is!
    Look at the attached vi....that's about all there is to it!
    Good Luck..
    Eric
    Eric P. Nichols
    P.O. Box 56235
    North Pole, AK 99705
    Attachments:
    ARRAY_TO_WAVE.vi ‏17 KB

  • How to convert String array into int.

    void getSoldSms(Vector vecSoldSms)
         String str[]=new String[vecSoldSms.size()];
         String words[]=new String[str.length]; // String array
              for(int i=0;i< vecSoldSms.size();i++)
                   str=(String)vecSoldSms.get(i);
              }               //End for
              for(int i=0;i<str.length;i++)
              words = str[i].split("\\|\\|");
              System.out.println();
              for(int j=0;j<1;j++)     
              int count[str.length]=Integer.parseInt(words[i]);
              System.out.print(count[j]*advance_count);
              } // end inner for loop
              }          //End for
         }          //End function getSoldSms
    how do i convert words which is a string array into int type. i kno string can be converted into int using interger.parseint. but wat abt string arrays??? plz help me out with the above code.

    i did tht its still giving the same errorFor Heaven's sake, what about taking a second to try to understand the code you're copying first? If you really can't fix the error yourself, you have a more serious problem than just convertingStrings to ints.
    And if you want { "1", "2", "3" } to be 123:
    StringBuffer b = new StringBuffer();
    for (int i = 0; i < array.length; i++) {
      b.append(array);
    int result = Integer.parseIn(b.toString());

  • How do I convert an array of BYTES (where each BYTE represents a bit) into a single Hex number?

    I am reading a signal from a USB-8451. This signal is stored as an array where each element represents a bit in the signal, but is stored in the array as a byte. How do I convert this array into a single Hex number. I attatched what I have so far, there are a few extra things to help me see what ia going on. One code uses Queue and the other uses arrays, let me know if you can help.
    Attachments:
    845x_EEPROMarrays.vi ‏27 KB
    845x_EEPROM.vi ‏26 KB

    mkssnwbrd wrote:
    ... so we can't introduce any other forms of signals or power into the circuit other than what the circuit already has. Trithfully I don't really know how I2C devices work, but my mentor here says that we can't use an I2C method becuase it will introduce voltage into the circuit and may damage out TCON chip.
    That makes absolutely no sense. What do you think is happening when you write the digital lines? You're setting a pin high. That voltage is being generated by the 8451x. I think you're not understanding what your mentor is saying. If it's an I2C device then you should be able to use the I2C function to simply talk to it. You still have not indicated what the device is, so there's little more I can say about that aspect of it.
    As far as the conversion is concerned, you basically need loop through your array of "bits", taking 16 at time since you said you have 16-bit values. It's not clear from your code whether your eventual goal is to get a numeric value or a string. This does not appear to be a subVI, so a simply numeric indicator formatted to display in hex format should be quite adequate. The array you are generating is an array of rings, whose datatype is I32, but they will have values of 0 or 1. You can use the example just posted, or you can use the attached variation.
    Attachments:
    Bits to Hex 2.vi ‏17 KB

  • How to convert an array of numbers into a time signal?

    I have an array of 512 data points. I want to convert this array into a time domain signal (the one with the brown color). How would I do this? Please let me know soon...Thanks!

    If you are referring to waveform data type, use the "build waveform" function as illustrated in the attached vi. Also check LabVIEW help waveform example for more sample vi.
    Attachments:
    sample_vi.vi ‏30 KB

  • How to convert digital array data into analog signal

    i want help to convert digital data array into analog signal

    shubham62 wrote:
    We are implimenting real time audio trans-receiver. We have converted input audio data(analog form) into digital data. At the receiver side we received digital data which is in the form of digital data array.But we are unable to recover back our original input data. So please help us to sort out the problem.
    Still no useful information.  How was the data converted to digital in the first place?  What conversion parameters did you use?  As was said, you just need to do the math backwards to get it back into the analog.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Convert binary string into binary array

    Dear I am looking for a way to convert my ten bit string array into 10 bit array.
    Any idea?

    Yes, but you need to tell us in more details what you have and what you want.
    There is no "10bit string", they come in integer multiples of 8 bits. Some possible interpretations:
    Maybe you have a 2 character string (16bits). Do you want the 10 low order bits?
    Maybe you have a 10 character formatted string of zeroes and ones, one character for each bit.
    Do you have a long string and every 10 consecutive bits are one 10bit number that you want as integer?
    Please clarify!
    There is no "10bit array". Do you want:
    a boolean array with 10 elements, one element per bit?
    An integer array if ones and zeroes?
    An array of U16, each element corresponding to 10bits of the original string?
    something else?
    It might help if you could attach a small example containing typical data. (make current values default before saving and attaching here).
    LabVIEW Champion . Do more with less code and in less time .

  • To convert an ArrayList into a 2-D array

    Is there any efficient and good technique to convert an ArrayList into a 2-D array? Suppose I have an ArrayList that contains objects of my defined class and then I would like to convert this ArrayList into a 2-D array.
    Can someone please help me out here? Your help will be really appreciated!
    Edited by: ti_ma on Mar 18, 2008 4:59 PM

    i think what some people are trying to say is that it would just be fine to use a for loop; i don't know about any magically fast ways of doing it, but it probably won't matter that much unless you're trying to optimize by like nanoseconds...
    it would just be easy and good to do something to the effect of:
    //assuming your ArrayList is called list
    Object[][] arr = new Object[list.size()][3];
    int i = 0;
    for (Book b : list) {
       arr[0] = b.name;
    arr[i][1] = b.price;
    arr[i++][2] = b.isbn;
    hope that helps!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How can I convert an array off byte into an Object ?

    Hi folks...
    I�m developing an application that comunicates a PDA and a computer via Wi-Fi. I�m using a DataStream ( Input and Output ) to receive / send information from / to the computer. Most off the data received from him is in the byte[] type...
    How can I convert an array off byte ( byte[] ) into an Object using MIDP 2.0 / CLDC 1.1 ?
    I found on the web 2 functions that made this... but it uses a ObjectOutputStream and ObjectInputStream classes that is not provided by the J2ME plataform...
    How can I do this ?
    Waiting answers
    Rodrigo Kerkhoff

    There are no ObjectOutputStream and ObjectInputStream classes in CLDC. You must know what you are writing to and reading from the DataStream. You should write the primitives like int, String to the DataOutputstream at one end and read those in exactly the same sequence at the outher end using readInt(), readUTF() methods.

  • How can I convert an array with varying length into a cluster

    Hi,
    I need to convert an array of n elements into a cluster. Usually, it only involves the "Array to Cluster" function. But since the array length is not constant and the number of elements in the function is constant and can not be changed programaticaly, I need to find another way to do that.
    Any ideas?
    Thanks.

    Hi,
    I also tried to do this but without success. I think that's not possible.
    For me it's a general problem using labview. I often wanted to generate standard controls dynamically which is not possible (or I haven't found the solution yet). So I think that's the reason why you can't create a cluster during runtime (the program would have to add controls dynamically to the cluster).
    Do you have an upper limit for your array-size? Although it needs a lot more memory, it would be a possibility to create the cluster with the maximum number of elements.
    If you don't have a maximum, you will have to look for another way, I'm afraid.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...

  • How can I convert a U32 array into binary string?

    Hi
    I would like to find an efficient way to convert an array of 8192 U32 into a single binary string!!!
    the solution below  last 550 ms on an RT target to convert 8192 U32.
    The same code running on Labview (not RT) last 100ms. I don't understand why there is such a difference.
    I've tryed to replace the inner loop and convert by a format string whith U32 on entry and %032b as parameter but it lasted same time.
    Thanks a lot

    Your picture of your code didn't come through. You can't link to a picture that's on your computer, as a server on the internet cannot access your computer to display the picture for others to see. You have to upload the picture as an attachment. Then, if you want to actually display the picture in the message you have to edit your post, insert a picture, and when it asks for the URL you enter the URL of the picture. You can get the URL when viewing the message, as the link is within the message itself.
    As for your question, can you just use the TypeCast function?

  • Converting object wrapper type array into equivalent primary type array

    Hi All!
    My question is how to convert object wrapper type array into equivalent prime type array, e.g. Integer[] -> int[] or Float[] -> float[] etc.
    Is sound like a trivial task however the problem is that I do not know the type I work with. To understand what I mean, please read the following code -
    //Method signature
    Object createArray( Class clazz, String value ) throws Exception;
    //and usage should be as follows:
    Object arr = createArray( Integer.class, "2%%3%%4" );
    //"arr" will be passed as a parameter of a method again via reflection
    public void compute( Object... args ) {
        a = (int[])args[0];
    //or
    Object arr = createArray( Double.class, "2%%3%%4" );
    public void compute( Object... args ) {
        b = (double[])args[0];
    //and the method implementation -
    Object createArray( Class clazz, String value ) throws Exception {
         String[] split = value.split( "%%" );
         //create array, e.g. Integer[] or Double[] etc.
         Object[] o = (Object[])Array.newInstance( clazz, split.length );
         //fill the array with parsed values, on parse error exception will be thrown
         for (int i = 0; i < split.length; i++) {
              Method meth = clazz.getMethod( "valueOf", new Class[]{ String.class });
              o[i] = meth.invoke( null, new Object[]{ split[i] });
         //here convert Object[] to Object of type int[] or double[] etc...
         /* and return that object*/
         //NB!!! I want to avoid the following code:
         if( o instanceof Integer[] ) {
              int[] ar = new int[o.length];
              for (int i = 0; i < o.length; i++) {
                   ar[i] = (Integer)o;
              return ar;
         } else if( o instanceof Double[] ) {
         //...repeat "else if" for all primary types... :(
         return null;
    Unfortunately I was unable to find any useful method in Java API (I work with 1.5).
    Did I make myself clear? :)
    Thanks in advance,
    Pavel Grigorenko

    I think I've found the answer myself ;-)
    Never thought I could use something like int.class or double.class,
    so the next statement holds int[] q = (int[])Array.newInstance( int.class, 2 );
    and the easy solution is the following -
    Object primeArray = Array.newInstance( token.getPrimeClass(), split.length );
    for (int j = 0; j < split.length; j++) {
         Method meth = clazz.getMethod( "valueOf", new Class[]{ String.class });
         Object val = meth.invoke( null, new Object[]{ split[j] });
         Array.set( primeArray, j, val );
    }where "token.getPrimeClass()" return appropriate Class, i.e. int.class, float.class etc.

  • How to convert Property files into Java Objects.. help needed asap....

    Hi..
    I am currently working on Internationalization. I have created property files for the textual content and using PropertyResourceBundles. Now I want to use ListResourceBundles. So what I want to know is..
    How to convert Property files into Java Objects.. I think Orielly(in their book on Internationalization) has given an utitlity for doing this. But I did not get a chance to look into that. If anyone has come across this same issue, can you please help me and send the code sample on how to do this..
    TIA,
    CK

    Hi Mlk...
    Thanks for all your help and suggestions. I am currently working on a Utility Class that has to convert a properties file into an Object[][].
    This will be used in ListResourceBundle.
    wtfamidoing<i>[0] = currentKey ;
    wtfamidoing<i>[1] = currentValue ;I am getting a compilation error at these lines..(Syntax error)
    If you can help me.. I really appreciate that..
    TIA,
    CK

  • Have bought service below to convert pdf files into word excel, Have followed instructions but cannot convert file. Please help.  AD003225761BR Produtos pedidos: Qtd. produto 1 Adobe ExportPDF, Annual (Outro,Todos os idiomas disponíveis) My email: toledo-

    Have bought service below to convert pdf files into word excel, Have followed instructions but cannot convert file. Please help.
    AD003225761BR Produtos pedidos: Qtd. produto 1 Adobe ExportPDF, Annual (Outro,Todos os idiomas disponíveis) My email: [email protected]

    Hi Jwalter,
    Thank you for posting on the Adobe forums,Please let us know what is the exact issue.
    Also, if you want help on how to use the service, kindly try the link below.
    Adobe ExportPDF FAQ
    http://tv.adobe.com/watch/insights-on-acrobat-solutions/introduction-to-adobe-exportpdf/
    Thanks,
    Vikrantt Singh

Maybe you are looking for

  • N95 16 GB micro sdhc memory card

    Hiya, Can I use the 16GB memory card in my N95??. The Nokia site shows I can uses the 8GB but the N95 is not listed for the 16GB. Also, What does the hc bit mean as all the memory cards before the 8GB only say sd and after they say sdhc Solved! Go to

  • One sales order with number of Ship to party??

    hi Experts                one customer has  10 plant . Customer give 10 PO from 10 plant to client . now my client want to create one sales order for for that customer and delivery goes to respective 10 plants (ship to party) for that customer and sa

  • IWeb Version and iWeb 08

    On my new iMac, I have iWeb 2.0.3 Can anyone tell me if that is the most current version? and if iWeb 08 is newer, different and better,, is it worth spending another $79 for another iLife? I also tried to download the iWeb 08 Manual from the downloa

  • Deleting web site

    Hi! I´m desperate, I was using iweb for my site with godaddy service. Once you changed to icloud, when i try to acces it says "service unavailable". I contact Godaddy and told me that it is redirected to .me. I am trying to delete my web page with iw

  • How do I consolidate photos from Finder into iPhoto Library?

    I would like to tidy up my photos on my iMac to save space and ensure that all is secure. Iam using iPhoto 08 on my iMac v10.8.5. My preference is to consolidate all my photos into my iphoto library so that I can manage my collection through iPhoto.