commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tiago Lacerda (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TEXT-86) StrBuilder Add New Replace Method
Date Sun, 03 Mar 2019 19:20:00 GMT

    [ https://issues.apache.org/jira/browse/TEXT-86?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16782827#comment-16782827
] 

Tiago Lacerda commented on TEXT-86:
-----------------------------------

Hi, I have added a pull request for this issue, let me know if you have any doubts

> 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
>             Fix For: 1.x
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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
(v7.6.3#76005)

Mime
View raw message