Removing spaces between characters using a loop

How can I remove spaces between characters using a loop? I made a program that tests the validity of a social insurance number. However, I'd like to be able to remove the spaces in the input if the users sepeates their SIN using spaces. example (123 456 789 becomes 123456789)
Thank you
Edited by: umhodzic on Feb 10, 2008 2:43 PM

umhodzic wrote:
Thank you for your response. However, the procudre must be done using a loop.It doesn't have to be done using a loop, as already shown. However if you have some ignorant person telling you you have to have a loop, then here's a solution that uses a loop:String s = "123 456 789";
while (s.contains(" ")) {
  s = s.replaceAll(" ", "");
}

Similar Messages

  • Removing Space Between Web Parts causes Horizontal Bar in Modals

    Hello all,
    I used the following to remove space between Web Parts, but am now getting a horizontal bar in my modals. Please assist:
    http://www.ashokraja.me/tips/How-To-Remove-Extra-Space-Around-the-Web-Part-In-SharePoint-2013
    Thanks!
    Kelly
    Personal Blog: http://thebitsthatbyte.com

    I removed it using the following CSS, which aligns our spacing:
    Control spacing between Web Parts*/
    .ms-webpart-cell-vertical
    margin-top:
    0px;
    margin-bottom:
    0px;
    Personal Blog: http://thebitsthatbyte.com

  • How to remove space between pages in Oracle Reports 6i?

    Hi,
    I have customized one oracle report (rdf). Earlier, the standard report was showing the ouput in pages i.e. there exists space beteen the pages. But I want my custom report in such a way that it should show me the result in one page i.e. there should be no space between the pages as user wants to spool the output into excel sheet (xls format) after getting the result output obtained from my custom report. Presently, when i spool the data into excel sheet, there is still the space exists between the pages like...few records will come then white space...then records.
    How can I remove this space, so that user can easily spool the data into excel without existence of white space.
    Any sort of help on this will be highly appreciated.
    Thanks & Regards,
    Sumir Chawla
    Edited by: Chawla on Jan 4, 2009 10:20 PM

    Hi,
    My report is running on Unix. When I checked the output file in unix where it is getting generated, i saw ^L characters wherever the space appears when i see the output in apps (notepad) , like after every page where I am able to see the space in my output, there ^L is appearing in output file in unix, so how can I avoid this.
    I tried to adjust the frames and repeatinf frames also, even i tried changing the properties also of main region (body), but nothing is working for me and still the same issue occurs. I am not aware of this. Please suggest me.
    Thanks a lot!
    Regards,
    Sumir

  • More space between characters in different system...

    Hi,
    I'm facing a problem with a smartform.
    For the same document, there is a difference between my development system and my quality system.
    When I print my document in the quality system there is more space between the characters of the document !
    The smartform and style are the same in both systems.
    Is there someone who can help me to solve this issue ?
    Many thanks,
    Giu

    Hi Giu,
    Are you printing to the same printer and using the same printer drivers on both systems?
    Regards,
    Nick

  • Acro 9.2 Prof. adds randomly spaces between characters when document is safed

    We encountered the problem, that the prof. 9.2 version adds randomly spaces between words and characters in a way that the text layout is unfeasible.
    The document was absolutely correct generated from Word to PDF, but after the first save in Acrobat it is corrupted.
    The real bad fact is, that is problem occurs not on all workstations. Some are working without this bad problem. OS is Win XP SP3.
    Has anyone an idea how to solve this?? In the meantime we switched back to Acro 8 on the bad workstations.
    Thanx
    Don

    Firstly, there's no such thing as Apache 9.3, there's Apache 1 (and subversions) and Apache 2 (and subversions). Your error message -
    Oracle-HTTP-Server/1.3.28Shows you're using Apache 1.3.28
    Secondly, I'm confused by your comment -
    I do not have Apache 9.3 or higher but I think oracle should offer this in its companion CDOracle does offer the Apache server, if you're saying you didn't get it from Oracle then where did your Apache server come from?
    Thirdly, I notice from your config file -
    ErrorLog "|E:\oracle\product\10.1.0\Companion\Apache\Apache\bin\rotatelogs logs/error_log 43200"That you're piping the logs through rotatelogs, are you sure the logfiles haven't just been renamed?

  • Removing spaces between clips in imovie 10!?

    Hello everyone!
    first of all sorry if this questions is in the wrong place!
    Anyway, I was wondering if there is ANY way to remove the spaces between video clips in imovie 10? The Spaces look like little black vertical lines... I'm trying to sync my video with a song that im using, and this proves to be very hard when i cant see where my video clips ACTUALLY start in the timeline....
    ANY help is apreciated! let me know if i need to be more specific!

    The black lines are just placeholders for adding transitions. If there is no transition the skimmer will jump to the start of the next clip. Easy way to find start of clip is to turn on snapping in view mwnu or hit the N key. Basically you can ignore the black lines unless you want to drop in a transition.

  • Receiver SFTP adapter giving spaces between characters in the Output file

    Hi PI Experts,
    My Scenario is: Paymul (EDI file ) ECC -> PI -> SFTP server.
    Source Sender File adapter able to pickup this Paymul D96A file and able to send messages to target SFTP server using SFTP receiver adapter.
    But, Generated Output file having single space between each character. I am not using any content conversion modules in Receiver SFTP adapter.
    Also not having any mappings to transform the messages. it is just pass through interface.
    I have attached example Output file. I have changed the .Dat file to .txt just to attach here.
    Could any one try to help me on this. Please let me know incase need any more details.
    Thanks,
    Govindu.

    Hi Govindu,
    Please see if the below Endcoding settings wont resolve your issue.
    File Type - Text
    File Encoding - ISO-8859-1
    Regards,
    Jannus Botha

  • How to remove space between the lines

    Hi,
    In my repoprt output I am getting space between the lines. I have changed
    the repeating frame and field -> vertical elasticity and horizontal elasticity to fallowing combinations.
    fixed, fixed.
    variable, fixed,
    expand, variable,
    variable, expand
    Then also I am getting space between the lines of my output.
    Could you help me in this?
    Thanks

    Change the Vertical Elasticity of fields and frames to Variable. If for some fields or frames you don't want to change the vertical elasticity, then remove extra space by adjusting the height of fields/frames.
    Also check repeating frames property 'Vert. Space Between Frames'. Default is 0.
    Hope this helps.

  • How to remove space between two fields in emergency primary contact.

    How Can I remove a space between the two fields.IN emergency primary contact there are certain field called "C/O" and a i have added one text for this field inside that.But it is taking a big space between the "C/O" field and the text view.Plz suggest how I can re,move this?Also How Can I add new transparent container  with the end user personalization in the emergency contact field.

    Hi Peddi
    In my structure pannel I have simpleSearchPanel below that only i have the two lov fields ex: emp_no and emp_name . how to set the spacer between this From which Region where can find the spacer bean what proerty do i need to set
    Thanks
    AT

  • Removing space between components in a Repeater

    Hi,
    I have a component, based on a canvas, which is shown in a Repeater component. Unfortuantely the Repeater is add a space between each component, how can I remove the space created between each component so that they all sit next to each other.
    Thanks
    Stephen

    Found a solution for this, in my containing VBox I set the verticalGap to 0, this removed the space between each component. Thanks to Tracy Spratt on the Flexcoders forum  for this answer.
    Stephen

  • Removing spaces between footnotes in Pages

    New to Pages, so this may just be a setting I've missed. I've got pages with several footnotes and the spaces between the footnotes, though nice, are not considered to be the "proper" format. How do I remove this space so they're more blocks of text? I'd prefer a solution that still allows the footnotes to be "separate" so that footnotes can move with repagination.

    nevermind. Found it in the Inspector. Still new to Macs so that always throws me off

  • Remove space between words

    Hello All,
    I loaded text into Oracle table and stored as clob. However, there are many space between the words. Would you please show me how to remove the space between the words like da ta and dome stic?
    table T1 contains filetext. One of row in the table looks like this:
    filetext = '<P>The dollar value of the entire shipment. This was defined as the net selling
    value, f.o.b. plant, exclusive of freight charges and excise taxes. The value da
    ta are displayed in millions of dollars.</P>
    <P>The total value of shipments, as measured by the CFS, and the U.S. gross dome
    stic product (GDP) while similar in size provide different measures of economic
    activity in the United States and are not directly comparable'
    I am very appreciated all the help from you
    Jenny

    Or you can do this as suggested by cd ->
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:01.34
    satyaki>
    satyaki>SELECT replace(CONVERT('Ä Ê Í Ó Ø A B C D E ', 'US7ASCII', 'WE8ISO8859P1'),'?','') filtered_res,
      2            CONVERT('Ä Ê Í Ó Ø A B C D E ', 'US7ASCII', 'WE8ISO8859P1') non_filtered_res
      3     FROM DUAL;
    FILTERED_RES        NON_FILTERED_RES
    A E I O  A B C D E  A E I O ? A B C D E
    Elapsed: 00:00:00.03
    satyaki>
    satyaki>Regards.
    Satyaki De.

  • Read from Text File.vi adds spaces between characters

    I'm openning a text file in LabVIEW, and and need to parse some information from it.  However, when I open the file, there are extra spaces between the letters.  When I just open the same file with Notepad or Wordpad, the spaces are not there.  Is there a way to eliminate this problem?

    And, since after the \FF\FE, every other character is \00, you can even do a homebrew quick&dirty solution.
    Are the files always like that, or are some "normal"?
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    readspecialfile.png ‏12 KB

  • Removing spaces between cross tabs

    Hello...
    I created one cross tab with 10 rows and 2 columns(In Crosstab Expert). Based on grouping i got 5 set of cross tab reports,Each cross tab contains 4 records .But in between these crosstabs blank spaces are there ,How can i avoid such blank spaces...
                                             Thanks...

    Hello, (To view perfectly copy all and paste in editor window)
    No changes..,Actualy the space is between crosstabs.
    i will tell u the layout,
    ______________________________________    //Group Header section starts here
    headding1headding2headding3headding4*
    1st row
    2nd row
    3rd row
    |_4th row______________________________ |     //This is the border of CrossTab
    |                                                                  |     //remove this space
    |                                                                  |     //remove this space
    |                                                                  |     //remove this space
    |+++++++++++++++++++++++++++++++++|     //this is the Group headder Height
    headding1headding2headding3headding4*
    1st row
    2nd row
    3rd row
    |_4th row______________________________ |     //This is the border of CrossTab
    |                                                                  |     //remove this space
    |                                                                  |     //remove this space
    |                                                                  |     //remove this space
    |+++++++++++++++++++++++++++++++++|     //this is the Group headder Height
    I need the layout should be
    headding1headding2headding3headding4*
    1st row
    2nd row
    3rd row
    |_4th row______________________________ |    
    headding1headding2headding3headding4*
    1st row
    2nd row
    3rd row
    |_4th row______________________________ |    
    i had give fit section also...NO CHANGES!!!!
    Edited by: Jebin Manalil on Apr 7, 2009 3:16 PM

  • To remove space between a string

    Hi all,
    Please help me to solve this.
    I have a String "Your current options"
    i want to remove all the blank spaces in between the string
    The final string should be "Yourcurrentoptions"
    Please respond..

    Please dont double post, its considered rude.
    Mel

Maybe you are looking for

  • Tracks out of order within Album... (Why?)

    Why on certain albums only are the tracks out of order on the Album view in ITunes 11? I have ensured that the Artist, Album Artist, Album, Year fields are all in sync. for 95% of my albums this is NOT an issue. When I navigate to the folder they are

  • Unable to Connect database from Pro*c

    Hi, We had installed Pro*c in Oracle 8.1.7.0.0 server and in client oracle_home we set as server Oracle home directory. we are using forms5.0 and pro*c Now we are in the process of migration to Forms6i. We installed in same orant client directory. if

  • How to (freshly) install Lion on a headless Xserve

    Dear all, I'm writing here as I'd need some help on how to install Lion on a headless Xserve. The Xserve has a static IP address, a DNS name and it is able to connect to the Internet. In order to install the OS on it I booted the machine from a self-

  • BAPI_GOODSMVT_CREATE - External range for document ranges interval

    Hi, my problem is that use the bapi BAPI_GOODSMVT_CREATE to create goods movements (101) and the BAPI returns an internal number for the document number when the number range interval is defined as external . Can anybody help me ? Thanks you very muc

  • Need help @ listening combo box

    Hi Everyone, below is my code. Please find my question between '?'ed lines. // CREATE COMBO BOX if(obj.equals(CSV_COMBO_BOX))      _combobox[_combobox_count] = new JComboBox();      //get possible value for combo box      String [] possible_values =