How to delete the last "\n" ??

Hey!
I have a string with alot of "\n" within it, how can i only delete or substring or something to get rid of the last appreared "\n" ?
I generates a text dokument like:
hi "\n"
hi "\n"
hi "\n" Dont want the last one "\n" here!!
Can i do that with substring ?
/Thanks
Mike

There is a substring method like this:
substring(int beginIndex, int endIndex)So you could use the lastIndexOf() mehod to find the last index of "\n", then use the substring method.

Similar Messages

  • I got a new wireless connection for my mac and cannot figure out how to delete the last connection service I had. Everytime I shut the computer, the network goes back to the other one. I cannot find the file ANYWHERE

    got a new wireless connection for my mac and cannot figure out how to delete the last connection service I had. Everytime I shut the computer, the network goes back to the other one. I cannot find the file ANYWHERE

    Under Network Preferences, select the WiFi
    click on "Advanced..." button
    Select the network you want to delete from the list and click on "-"
    Click "Ok"
    Click "Apply"
    Well done ;-)
    You may also want to delete the wireless key from Keychain.
    Open Keychain, seach for the old wifi network name, slect it and click delete

  • How to delete the last element of a collection without iterating it?

    how to delete the last element of a collection without iterating it?

    To add to jverd's reply, even if you could determine the last element, in some collections it is not guaranteed to always be the same.
    From HashSet:
    It makes no guarantees as to the iteration order of the set; in particular, it does not guarantee that the order will remain constant over time.

  • How to delete the last char in a String?

    i want to delete the last char in a String, but i don't want to convert the String to a StringBuffer or an array, who knows how to do?

    Try it in this way
    String MyString = "ABCDEF";
    MyString = MyString.substring(0,MyString.length()-1);

  • To delete the last line of the internal table

    How to delete the last line of the internal table.???????
    The list which gets displayed from the internal table adds a dummy line at the last which shows zeros and zeros.all the otheer selections are perfect.i just want to delete the last line which comes as zero zero.is there any way to do it...

    Quite Easy......Use Describe command to Count the Total Number of Table Lines, and then Delete the Last Line using Index.
    Data L like sy-tabix.
    Describe Table Itab Lines L.
    Delete itab index L.

  • Recently, U2 music appeared on my ipod without my requesting it or wanting it. I was able to delete all of the songs except for one. How do I delete the last one from my ipod? The song does not show up in iTunes when I plug my ipod into the computer.

    Recently, U2 music appeared on my ipod without my requesting it or wanting it. I was able to delete all of the songs except for one. How do I delete the last one from my ipod? The song does not show up in iTunes when I plug my ipod into the computer. The version installed on my ipod is 7.1.2(11D257).

    Hi donfrommars,
    Welcome to the Apple Support Communities!
    Please use the following article for information and instruction on deleting the U2 album from your devices and account.
    Remove iTunes gift album "Songs of Innocence" from your iTunes music library and purchases
    Have a great day,
    Joe

  • Hi, since the last update i find my rented movies remained under rented although unplayable. now i find some, as before the update, are deleting fully - can anyone tell me how to delete the unwatchable covers that remain?

    hi, since the last update i find my rented movies remained under rented although unplayable. now i find some, as before the update, are deleting fully - can anyone tell me how to delete the unwatchable covers that remain?

    bunjamin wrote:
    There is now a new line in BBM that wasn't there before which covers the message that I am typing, so I can't actually see what I am typing.
    Hi bunjamin,
    just go to BlackBerry World, and update all your apps including BBM.
    bunjamin wrote:
    Every time I unlock my phone, my screen enlarges so I can't really see much on the hub/notification screen and it defaults to the hub which it didn't do before).
    you can turn off the magnifying glass :
    device settings >> accessibility >> magnify mode >> OFF
    you can deactivate the "reset to Hub view" :
    hub >> overflow (bottom right button) >> Settings >> Display and actions >> Return to Default View When Idle >> OFF
    bunjamin wrote:
    my ringtone is much softer than it was previously
    yes, BlackBerry has acknowledged this bug in this article from the public knowledge base:
    KB36755 After upgrading BlackBerry 10 OS to version 10.3.1 the volume for notifications is noticed to be significantly lower than in the previous version
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • How to delete the line between the last point and first point?

    How to delete the line between the last point and first point? 
    I want to draw a curve many times, from first point to the end point. and redraw from first point to the end point.But I hope update point by point. but between the end point and the first point,  there is a line. How to delete the line?
    the code is:
    CNiReal64Vector plotData(50);
    m_graph.ChartLength = 50;
    //m_graph.ClearData();
    for (int j = 0; j < 2; j++)
           for (int i=0; i<50; i++)
                   plotData[i] = ((double)rand()/(double)RAND_MAX)*6 + 4;
                   m_graph.GetPlots().Item("Plot-1").ChartXY(i, plotData[i]);
                   Sleep(100);
    Attachments:
    20150605142608.png ‏31 KB

    Hi Kumar,
    I think you can just delete it in the sales order directly, if you are using make-to-order scenario, then there will be special stock left for the sales order as the production has been goods receipt, you need to use MM transaction move the stock to unrestricted use stock. If you are using make-to-stock scenario, there should be no further problem. If you are using assembly order, please try to reject the sales order item to see if it could fullfill your requirement.
    Regards,
    Rachel

  • How do I delete the last photos synched from my iMac to my iPad?

    How do I delete the last photos synched from my iMac to my iPad from the iPad?  They have taken up all of my storage.

    Synced photos can only be deleted by syncing again with iTunes and deselecting all synced items.
    See:  iTunes: Syncing photos

  • How to eliminate (delete) the last blank page in the script?

    Does anyone of you know how to eliminate (delete) the last blank page that appears in the script? My story is 126 pages long but in the screenplay (the document) 127 pages appear because the last one is a blank page, how do I erase this page? Thank you.

    You can try the following:
    - pressing delete key at the end of the text at page 126
    - Check if you have the option to 'Unlock Pages' in 'Production' Menu.
    If you still face this issue, then can you please save that document to disk (File > Save To Disk) and mail us at DL-AdobeStory-support<at>adobe<dot>com, so that we can suggest a fix?

  • How can I delete the last row of a Matrix

    Hi All,
    Does anyone know whether deleting the last row of a matrix controlled by a UDO child table gives problems? I have the strange effect that I cannot delete the very last existing row in the matrix, i.e. after updating the delete the last to-be deleted row comes back into my matrix !!
    I give you a snippet of my code (function getSelectedRow gives the selected row in the matrix):
    ==
    if (evnt.ItemUID.Equals(ViewConstants.Items.DELETEBUTTON))
      if (evnt.EventType == BoEventTypes.et_ITEM_PRESSED)
        if (evnt.BeforeAction)
          form = BusinessOne.Application.Forms.Item(formUID);
          mtx = (Matrix)form.Items.Item(ViewConstants.Items.MATRIX).Specific;
         int numRow = getSelectedRow(mtx);
         if (numRow != -1)
                                            mtx.DeleteRow(numRow);
                                            form.Mode = BoFormMode.fm_UPDATE_MODE;
                                       Item btn = (Item)form.Items.Item(ViewConstants.Items.ADDBUTTON);
                                       btn.Enabled = true;
    ==
    Cheers,
    Marcel Peek
    Alpha One
    Message was edited by: Marcel Peek
    Message was edited by: Marcel Peek

    Yes, there is a problem to delete the last row.
    It is fixed in version 2005.

  • How to get the last 3 digits of a Delivery Number

    Hi All,
    On the Transfer Order Collective form, the Delivery Number is printed. But I need to capture the last 3 digits of that delivery number and make the 3 digits to be printed on the same form with bigger font size. I would like to know how to capture the last 3 digits.

    If so, your form(subroutine) can look like this.
    form  get_last_3_digits tables co_sym_using   structure itcsy
                                   co_set_symbols structure itcsy.
      data: xvbeln type likp-vbeln.
    * Get the USING Values
      read table co_sym_using with key name = 'LIKP-VBELN'.
      check sy-subrc eq 0.
      shift co_sym_using-value left deleting leading space.
      xvbeln  = co_sym_using-value.
    * make sure it is internal format
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
           exporting
                input  = xvbeln
           importing
                output = xvbeln.
    * Update the value
      read table co_set_symbols index 1.
      co_set_symbols-value = xvbeln+7(3).
      modify co_set_symbols index 1.
    endform.
    Regards,
    Rich Heilman

  • How to Delete the Latest Version of a Document

    Suppose i have a document A which has 3 versions, 1,2 and 3
    now i have to delete the 3rd version and make 2nd as the latest
    one. how to go about doing that??

    Are you sure? It seems that you could get the last version description and delete it with the free() method as follows:
    VersionDescription[] vds = IfsFileSystem.getHistory(po);
    // delete the last version
    vds[vds.length-1].free();

  • Can't back up my Iphone5 to my macbook pro, it tells me it may be corrupted, also I don't know how to delete the old backup to redo it

    Can't back up my Iphone5 to my macbook pro, it tells me it may be corrupted, also I don't know how to delete the old backup to redo it

    Hi Caveman337,
    Welcome to the Support Communities!  The resource below will explain how to delete an old iTunes backup.  Before you do this, I would suggest creating an iCloud backup of your iPhone. 
    Back up and restore your iPhone, iPad, or iPod touch using iCloud or iTunes - Apple Support
    http://support.apple.com/en-us/HT203977
    Back up using iCloud
    If you're using iCloud, it can automatically back up your content. Use these steps to turn on iCloud Backup:
    Tap Settings > iCloud > Backup. If you're using iOS 7 or earlier, tap Settings > iCloud > Storage & Backup.
    Tap iCloud Backup to turn it on.
    Tap Back Up Now.
    After you turn on iCloud Backup, iCloud will back up your content automatically. You can return to this screen to see when the last back up happened.
    Create and delete iPhone, iPad, and iPod touch backups in iTunes - Apple Support
    http://support.apple.com/en-us/ht4946
    Where your backups are stored
    The folder where your backup data is stored depends on your computer's operating system. Make sure the backup folder is included in your data-backup routine. iTunes places the backup files in these places:
    Mac: ~/Library/Application Support/MobileSync/Backup/
    The "~" represents your Home folder. If you don't see Library in your Home folder, hold Option and click the Go menu.
    Delete a backup
    If you want to delete a backup created by iTunes:
    Open iTunes Preferences:
    Mac: Choose iTunes > Preferences.
    Windows: Choose Edit > Preferences. Learn how to turn on menus in Windows 7 and 8.
    Click Devices. (The iOS device doesn't need to be connected.)
    iTunes will show the phone number, International Mobile Equipment Identity (IMEI) number, and serial number of the backed up iPhone when you position your mouse pointer over a backup. (Only the serial number will be shown for iPad and iPod touch). You can use this to find the backup you want to delete.
    Select the backup you want to remove.
    Click Delete Backup.
    When prompted, confirm that you want to remove the selected backup by clicking Delete Backup.
    Click OK to close the iTunes Preferences Window.
    Backups that have a date and time stamp in the backup name are copies of backups created by restoring the iOS device. The date and time in the left column are when the restore-from-backup occurred. The date and time in the right column are the last synced date; this shows how current the data is.
    I hope this information helps ....
    - Judy

  • HT1766 I cannot backup my iphone, it keeps telling me the backup is corrupt and not compatible. All forums have suggested I delete the last backup but that was months ago and I'm afraid if I do that and it still doesn't work, I won't have anything saved

    I cannot backup my iphone, it keeps telling me the backup is corrupt and not compatible. All forums have suggested I delete the last backup but that was months ago and I'm afraid if I do that and it still doesn't work, I won't have anything saved. Can anyone help?

    Try to connect in recovery mode, explained in this article:
    iOS: Unable to update or restore
    Before that, back up your device, explained here:
    iOS: Back up and restore your iOS device with iCloud or iTunes
    How to back up your data and set up as a new device
    You can check your warranty status here:
    https://selfsolve.apple.com/agreementWarrantyDynamic.do

Maybe you are looking for

  • Can't find the "Video" move button on Apple TV to move Rentals from MacBook

    Hi, I just bought an Apple TV. I had a couple of rented movies on my MacBook Pro and would like to watch the rentals on the Apple TV. I have already looked in support and it says it is possible to move the rentals to the Apple Tv by clicking on the d

  • Importing MS word files with footnotes

    Laying out a textbook. Client provided formatted text. The footnotes travel with the text as I edit which is great. However, I do not want the rule that separates the footnote from the text. I've searche ID and MS Word high and low to see how to get

  • Webservice Errors

    Hello, I'm currently running Oracle 9i (9.2.0.1). I'm also using JDeveloper 10g Preview version. Please note: I'm actually a Microsoft C#/SQL Server developer, however, I'm using oracle to test consuming a webservice I wrote in .NET. I'm relativly ne

  • Error in compiling an entity object

    I am new to OAF. I am trying to create a page. I created a new workspace, two projects, In one project an entity object and in the 2nd project created a view object based on the entity object and an application module. I am getting some error when I

  • How do I update stocks widget?

    Every time I try to add a stock I get a message saying "failed to validate symbol". I am trying to add well known stocks from a published list such as DJI? Why am I getting that message and how do I update my list?