|
Delete the last character from a string
|
|
08-18-2008, 09:08 PM
Post: #1
|
|||
|
|||
|
Delete the last character from a string
How do I remove the last character from a string? Assume that I have a String named str
str="Hello World"; I want to remove the last 'd' from str. |
|||
|
08-18-2008, 09:24 PM
Post: #2
|
|||
|
|||
|
RE: Delete the last character from a string
Use the substring method. For eg:
[java] str = str.substring(0, str.length() - 1); [/java] |
|||
|
08-19-2008, 04:28 PM
Post: #3
|
|||
|
|||
|
RE: Delete the last character from a string
Thank you.
|
|||
|
« Next Oldest | Next Newest »
|

Search
Member List
Calendar
Help




