How-to articles, tricks, and solutions about STRING
Remove control characters from PHP string
In PHP, you can use the preg_replace function to remove control characters from a string.
Remove final character from string
You can remove the final character from a string in Python using string slicing.
Remove part of string in Java
To remove a part of a string in Java, you can use the replace() method of the String class.
Remove portion of a string after a certain character
There are several ways you can remove a portion of a string after a certain character in PHP.
Simple way to repeat a string
In Java, you can use the String.repeat() method to repeat a string multiple times.
Split string on whitespace in Python
You can use the split() method to split a string on whitespace in Python.
string to string array conversion in java
There are several ways to convert a string to a string array in Java. Here are a few options:
Title case a string containing one or more last names while handling names with apostrophes
In PHP, you can use the ucwords() function to convert a string to title case.