Originally posted by Ajith Kallambella:
Read it again.
If this String object represents an empty character sequence, or the first and last characters of character
sequence represented by this String object both have codes greater than \u0020 (the space character),
then a reference to this String object is returned.
If the string you are operating on has no leading/trailing white space character, you get the reference to the original string itself. This is true for other methods ie., calling toUpperCase() on an uppercase string, or calling toLowerCase on a lower case string.
Does this answer your question?
Originally posted by Ihor Strutynskyj:
Bongadi, sorry I misspelled your name.
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your databasehttps://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database