BELUGA BEHR created TEXT-86:
-------------------------------
Summary: StrBuilder Add New Replace Method
Key: TEXT-86
URL: https://issues.apache.org/jira/browse/TEXT-86
Project: Commons Text
Issue Type: New Feature
Reporter: BELUGA BEHR
Priority: Minor
I was looking at some code and thought TEXT might help. Please add to
{{org.apache.commons.text.StrBuilder}} a new method signature:
{code}
replaceAll(char search, String replaceStr)
{code}
This would be helpful for escaping individual characters:
{code}
/*
* (non-Javadoc)
*
* @see java.sql.PreparedStatement#setString(int, java.lang.String)
*/
public void setString(int parameterIndex, String x) throws SQLException {
x=x.replace("'", "\\'");
this.parameters.put(parameterIndex,"'"+x+"'");
}
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)