Skip to content

I20210206-0720

tagged this 06 Feb 11:46
String.substring()

Removes the second substring() parameter if this parameter is the length
of the string. It's the default value.

Given:
text.substring(2, text.length());

When:
Clean up the code enabling "Redundant String.substring() parameter"

Then:
text.substring(2);

Change-Id: Ic0e531170374c4bb0ee4e5cc0588541b9b16b068
Signed-off-by: Fabrice Tiercelin <fabrice.tiercelin@yahoo.fr>
Assets 2
Loading