Add space

Hi!
I have a string lets say str... i know what the maximum length of this string can be .Lets assume it to be 30. the data value thats coming into this string is of length 5 chars. what i want to do is to add spaces after the data value upto its maximum length..liek in this case i should add 25 spaces to make it of length 30. Is there any function in java using which i could do it.There is an option for finding the present length and using a loop to add spaces.. but that would be a bit lengthy.. Pls help .. Thanx..

> PS... i did not get what you meant by 1 of
loop....and in that length() function
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/for.html
In the link above there is given an example of a for loop (statement). The variable int i starts at 1 and gets incremented to a certain value. You need to adjust the initial size and the "end" size of i.
In the loop you append, or prepend, a white space to your String.

Similar Messages

  • How to add spaces at the end of record

    Hi Friends,
    i am creating a file which contains more than 100 records.
    In ABAP i have internal table with on field(135) type c.
    some time record have length 120, somtime 130 its vary on each record.
    but i would like to add space at the end of each record till 135 length.
    Can you please help me how to add speace at the end of record.
    regards
    Malik

    So why did you said that in your first posting? My glass sphere is out for cleaning...
    Instead of type c use strings and add spaces until they have the appropriate length.
    loop at outtab assigning <pout>.
      while strlen( <pout>-val ) < 135.
        concatenate <pout>-val `` into <pout>-val.
      endwhile.
    endloop.

  • My HD is almost full. I need to add space. Can I use an external HD to continue using my startup disc as it is?

    My HD is almost full. I need to add space. Can I use an external HD to continue using my startup disc as it is?
    I create music and have run out of space. the message says 'your startup disc is almost full', and i just thought maybe buying an external hard drive and using it as the startup disc or whatever would do the trick. Does anyone know? Thanks!

    External hard drives are relatively inexpensive...see some of those on OWC, www.macsales.com
    You can use a large external drive to provide additional space by simply saving material to that volume instead of the startup disk.  You can also partition the external drive to use part for Time Machine backups, and another partition for extended space.  Or a third partition for a clone of the boot system made by Carbon Copy Cloner or SuperDuper, both free downloads, so should the internal drive have problems you could always boot from the external partition.
    All of that can be done from Disk Utility.
    Keep in mind that Mac OS X gets very unhappy when there is less than 15% of the startup disk space free.

  • Add spaces in XML tag in XI mapping

    Hello guys,
    In an IDoc to XML file scenario within XI, we want to add spaces at the end of an IDoc field that contains text description. When the IDoc gets generated on SAP ECC, the IDoc field is repeated so many times until all the contents are displayed, separated with spaces. However, once the IDoc is sent to XI, the spaces get lost. Is it possible to add a space at the end of each field presence within XI message mapping or they will get lost again ?
    Thank you.
    Best Regards,
    Evaggelos Gkatzios
    Edited by: Evaggelos Gkatzios on Nov 12, 2010 4:49 PM

    > In an IDoc to XML file scenario within XI, we want to add spaces at the end of an IDoc field that contains text description.
    The way IDoc processing works, that does not make any sense at all.
    An IDoc is a fixed length container and the fields are filled with spaces automaticically.
    The IDoc XML generation removes trailing spaces to reduce message size.
    If you need trailing spaces in an XML field, you can add them easily with a UDF. But I think that there are only rare scenarios where you really would need this.

  • How to add space between two tabs in accodion widget?

    Hi! I am using the accordion widgets and trying to add space between each of the tabs, would someone help me on this. Thanks

    Directly editing the output of Muse is virtually always a bad idea. At a minimum it will create a very cumbersome workflow since Muse will overwrite your changes every time you re-export (export, upload, publish, preview).
    It depends on exactly what visual effect you want to achieve, but you probably just need to select the accordion widget and use the Spacing panel to adjust the vertical gutter value.

  • Add space between set of Symbols - Grep Question

    hi everyone,
    I have another Grep question someone hopefully can help with. I need to find the following symbols in my long document < > + =      
    All these symbols need space either side of the character. I would like to setup a grep expression and have it find the symbols and add spaces either side. So far I can find each symbol but can't figure out how to add spaces before and after with the replace feature?
    find:
    =|<|>|+
    replace:
    can anyone help..
    lister

    Use this line in Find option: \+|\=|<|>
    Use this line in Replace option: <space>$0<space>
    Siva

  • Add space between Pop Menu Magic items?

    Is there a way to add space between the menu items in
    generated by Pop Menu Magic? By this I mean, can you have the
    various menu items (the "tabs" or "buttons") exist with some space
    between them
    (something
    like this but with maybe more space), as opposed to the default
    way the "tabs" are generated (butted up to one another
    like
    this)?
    I have tried editing the p7pm CSS to acheive this in a page
    design I'm roughing out. I get close sometimes but no cigar.....I
    have tried messing with the list items in the HTML code itself, but
    no luck there either.
    Hope I am making enough sense here....
    Thanks,
    Tommy

    Have you asked the question on the PVII newsgroup? You'd
    probably get a
    much faster response over there
    Nadia
    Adobe� Community Expert : Dreamweaver
    http://www.csstemplates.com.au
    - CSS Templates | Free Templates
    http://www.perrelink.com.au
    - Web Dev
    http://www.DreamweaverResources.com
    - Dropdown Menu Templates|Tutorials
    http://www.adobe.com/devnet/dreamweaver/css.html
    "steelkat" <[email protected]> wrote in
    message
    news:e5fapn$kmo$[email protected]..
    > Is there a way to add space between the menu items in
    generated by Pop
    > Menu
    > Magic? By this I mean, can you have the various menu
    items (the "tabs" or
    > "buttons") exist with some space between them <a
    target=_blank
    > class=ftalternatingbarlinklarge
    > href="
    http://css.maxdesign.com.au/listamatic/vertical11.htm">(something
    > like
    > this but with maybe more space)</a>, as opposed to
    the default way the
    > "tabs"
    > are generated (butted up to one another <a
    target=_blank
    > class=ftalternatingbarlinklarge
    > href="
    http://www.projectseven.com/viewer/index.asp?demo=pmm">like
    > this)</a>?
    >
    > I have tried editing the p7pm CSS to acheive this. I get
    close sometimes
    > but
    > no cigar.....I have tried messing with the list items in
    the HTML code
    > itself,
    > but no luck there either.
    >
    > Hope I am making enough sense here....
    >
    > Thanks,
    >
    > Tommy
    >

  • How do I add spaces in mission control in mountain lion?

    I use an external monitor on the right side of my mbp, the external monitor (when in use) is my main screen. I want my (auto retracting) dock on the right side of my right screen (the external one). The top right corner is my hot corner for mission control.
    With this setup, when I move my mouse to the right top corner I'll enter mission control, but somehow the "add a new space pop-up button" will not show up. I haven't tried this setup in Lion so I do not know if this is a bug for ML. I really like my dock on the right side of the screen, left is no option and I'm sick of having it at the bottom, but I do want to be able to add spaces, any thoughts how to do this?

    multiple ways,
    go to mission control and:
    hold option, a half of a desktop with a plus will appear, click it.
    drag an application's window next to the spaces there are already.
    put an app in fullsreen mode.
    move mouse over the top left side of the screen, and the desktop with the plus sign will appear to add a new space.

  • Add space between two rows

    Hello,
    I need to add space between rows. Please let me know how to go about.
    I have a messgeComponentLayout Region, i am trying to create a space between two rows.
    Presently it is as follows:
    Vacation Plan
    Sick Plan
    I need as follows:
    Vacation Plan
    Sick Plan
    Please let me know how to go about.
    Thanks!

    The foll. is the region, how do i incorporate the rowLayout as suggested in the discussion. Please let me know.
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!-- dbdrv: exec java oracle/jrad/tools/xml/importer XMLImporter.class java &phase=dat+24 checkfile:~PROD:~PATH:~FILE &fullpath:~PROD:~PATH:~FILE -username &un_apps -password &pw_apps -dbconnection &jdbc_db_addr -userId "1" -rootPackage /oracle/apps/~PROD -rootdir &fullpath:~PROD:mds:directory -->
    <oa:header version="9.0.3.8.12_1330" xml:lang="en-US" xmlns:oa="http://xmlns.oracle.com/oa" xmlns:jrad="http://xmlns.oracle.com/jrad" xmlns:ui="http://xmlns.oracle.com/uix/ui" xmlns:user="http://xmlns.oracle.com/jrad/user" xmlns="http://xmlns.oracle.com/jrad" file-version="$Header$" text="Year to Date Accruals and Time Taken (total hrs.):" amDefName="xbol.oracle.apps.xbol.selfservice.loa.server.YtdAM">
    <ui:contents>
    <oa:messageComponentLayout controllerClass="xbol.oracle.apps.xbol.selfservice.loa.webui.MainRNCO" rows="7" columns="2" amDefName="xbol.oracle.apps.xbol.selfservice.loa.server.YtdAM" id="Main">
    <ui:contents>
    <oa:messageStyledText id="VaPlCo" prompt="US Vacation Carry Over" viewName="VacPlAcVO1" viewAttr="VacationCarryOver" styleClass="OraDataText"/>
    <oa:messageStyledText id="VaPlAc" prompt="US Vacation Plan Accrual" viewName="VacPlAcVO1" viewAttr="UsVacationPlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="VaTk" prompt="Vacation Taken" viewName="VacPlAcVO1" viewAttr="VacationPlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="FlPlAc" prompt="US Floating Holiday Plan Accrual" viewName="VacPlAcVO1" viewAttr="UsFloatingHolidayPlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="FlTk" prompt="Floating Holiday Taken" viewName="VacPlAcVO1" viewAttr="FloatingHolidayPlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="AcBaTk" prompt="Accrual Bank Taken" viewName="VacPlAcVO1" viewAttr="AccrualBankPlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="item2"/>
    <oa:messageStyledText id="SiPlCo" prompt="US Sick Plan Carry Over" viewName="VacPlAcVO1" viewAttr="SickCarryOver" styleClass="OraDataText"/>
    <oa:messageStyledText id="SiPlAc" prompt="US Sick Plan Accrual" viewName="VacPlAcVO1" viewAttr="UsSickPlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="SiTk" prompt="Sick Taken" viewName="VacPlAcVO1" viewAttr="SickPlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="item1" rendered="true"/>
    <oa:messageStyledText id="PePlAc" prompt="US Personal Leave Plan Accrual" viewName="VacPlAcVO1" viewAttr="UsPersonalLeavePlan" styleClass="OraDataText"/>
    <oa:messageStyledText id="PeTk" prompt="Personal Taken" viewName="VacPlAcVO1" viewAttr="PersonalLeavePlan" styleClass="OraDataText"/>
    </ui:contents>
    </oa:messageComponentLayout>
    </ui:contents>
    </oa:header>

  • How do I add spaces with Yosemite?

    I have just upgraded to Yosemite and my spaces went missing. I have two monitors and the current configuration for is one space for each monitor and one for Dashboard. I have "Zoomed to Mission Control" and do not see an option to add spaces, neither an "add" or a "+" anywhere.n How can I add more spaces?
    Thank you,
    Michael

    Slide the cursor over to the top-right of the Mission Control window which should result in an Add button to appear.

  • Need a CS2 workaround - Add space for line at top of text box

    I need a way to add space before a line of text (it's a subheading kind of thing) which is the fist line in the text box, since "space before" in paragraph styles doesn't work for this. I'm stuck using CS2 at work, but I made the layout on CS4 at home that uses a workaround involving 0pt rules offset and the Keep in Frame option. This feature is not in CS2 (ugh).
    Any help is appreciated.

    A yucky way of pulling this off without CS3's (and later) "Keep Above Rule in Frame" could be to set the leading extra large. The default Baseline options for text frames is to ignore leading, but you can change it to use the leading. A drawback is that also impacts your regular text ...
    How about an even yuckier trick?
    1. Make the font extra extra large. InDesign ignores super-extra-big leading by default, but it does honor text size. To be precise: the text size that's in the character panel size box (this is important!). If you make the font extra extra large, this is the size that's going to be used.
    2. Now you have large text ... so scale it back down using the Horizontal and Vertical scale in the Advanced Character Formats. If you made the text twice as large, use 50% / 50% to scale it back.
    3. Done.
    I said it would be yuckie.

  • HT1900 I want to add space between songs, not shrink it. Can I do that?

    I want to add space between songs, not shrink it. Can I do that?

    Actually, it is possible to add a gap - to a Playlist of songs.
    If you want to add a time gap between songs (that wasn't on the album), in iTunes, or for use on an iDevice, this is possible, by creating a Playlist of the songs and adding a new specially created "song file" between each song. You can whatever gap you want.
    If this is what you want, post back and I can give you details.

  • HT201364 how do i add space for start up

    Hi do i add space or remove item on the start up disk

    Sorry, I don't understand.
    Are you trying to install Mavericks and it tells you there is  not enough disk space to install?
    If so, you need to look in your Documents, Pictures, Movies, etc and move any items you don't need onto an external device or delete them if you have no use for them ever again.
    Are you running 10.5.8 or 10.8.5?

  • Is it possible to add spaces between icons in the dock on Mountain Lion

    Is it possible to add spaces between icons in the dock on Mountain Lion to seperate into groups of applications?
    thanks

    http://www.youtube.com/watch?v=aKxw4_gv2vE
    DISCLAIMER: I haven't tried this myself, but I've seen it posted before.
    Matt

  • Add spaces to data.

    I have a data field of 40 char.
    e.g. lv_type = 'LOAN'
    should display as "                    LOAN"
    means though lv_type is 4 characters it should take 40 characters and add 36 spaces.
    so how to add spaces appropriately.
    if lv_type is 6 characters it should add 34 spaces.

    Hi santosh,
    1. This is one way. Just copy paste.
    2.
    report abc.
    data : lv_type(40) type c.
    data : ln type i.
    lv_type = 'LOAN'.
    *-------------------------- before
    write :/ lv_type.
    *-------------------------- after
    ln = strlen( lv_type ).
    ln = 40 - ln.
    shift lv_type right by ln places.
    write :/ lv_type.
    regards,
    amit m.

Maybe you are looking for

  • Why is the "other" on my iphone take up so much space?

    Why is the "other" on my iphone take up so much space?

  • Dimensions, Levels and Keys

    Folks, I am trying to deploy and load a dimension table composed of the following columns: Company Id Company_Name Corporation_Id Corporation_Name Cost_Center_Id Cost_Center_Name I have created three levels: Company, Corporation and Cost Center. Each

  • Adobe Reader XI freezes when editing

    I'm using Adobe Reader XI on Windows 8.1.  I read PDF's for school on my computer and add comments, underlines, highlights, etc. Using the comments, annotations and drawing markup features constantly.  Recently almost every time I make a single addit

  • Nothing is displayed in System Overview.

    Hi, I have taken over a Solution Manager and will set up system monitoring. When selecting Solution Monitoring > System Monitoring no system overview is displayed. Only this text: "Action canceled Internet Explorer was unable to link to the Web page

  • IPhoto keyword vanishes

    Only lately (perhaps since upgrading to 9.3), iPhoto has been having a problem with keywords "sticking" when I assign them to a photo.  The keyword fills in as I type, but disappears when I press enter.  In some cases, repeating the operation, or typ