[jira] [Commented] (LANG-1014) Adding unwrap and unwrapFull methods to StringUtils
[ https://issues.apache.org/jira/browse/LANG-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15275598#comment-15275598 ] ASF GitHub Bot commented on LANG-1014: -- Github user PascalSchumacher commented on the pull request: https://github.com/apache/commons-lang/pull/136#issuecomment-217721352 Jira: https://issues.apache.org/jira/browse/LANG-1014 > Adding unwrap and unwrapFull methods to StringUtils > --- > > Key: LANG-1014 > URL: https://issues.apache.org/jira/browse/LANG-1014 > Project: Commons Lang > Issue Type: New Feature > Components: lang.* >Reporter: Thiago Andrade >Assignee: Benedikt Ritter > Labels: github > Fix For: Review Patch, Discussion > > > Placeholder ticket for github PR 25: > https://github.com/apache/commons-lang/pull/25 > Adding the following methods from StringUtils: > {code:java} > public static String unwrap(String str, char unwrapChar) > public static String unwrapFull(String str, char unwrapChar) > public static String unwrap(String str, String unwrapStr) > public static String unwrapFull(String str, String unwrapStr) > public static String unwrap(String str, String unwrapLeft, String > unwrapRight) > public static String unwrapFull(String str, String unwrapLeft, String > unwrapRight) > {code} > These methods unwraps (fully or not) the string parameter. See pull request > for usage examples. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-1014) Adding unwrap and unwrapFull methods to StringUtils
[ https://issues.apache.org/jira/browse/LANG-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15255640#comment-15255640 ] ASF GitHub Bot commented on LANG-1014: -- Github user thiagoh closed the pull request at: https://github.com/apache/commons-lang/pull/25 > Adding unwrap and unwrapFull methods to StringUtils > --- > > Key: LANG-1014 > URL: https://issues.apache.org/jira/browse/LANG-1014 > Project: Commons Lang > Issue Type: New Feature > Components: lang.* >Reporter: Thiago Andrade >Assignee: Benedikt Ritter > Labels: github > Fix For: Review Patch, Discussion > > > Placeholder ticket for github PR 25: > https://github.com/apache/commons-lang/pull/25 > Adding the following methods from StringUtils: > {code:java} > public static String unwrap(String str, char unwrapChar) > public static String unwrapFull(String str, char unwrapChar) > public static String unwrap(String str, String unwrapStr) > public static String unwrapFull(String str, String unwrapStr) > public static String unwrap(String str, String unwrapLeft, String > unwrapRight) > public static String unwrapFull(String str, String unwrapLeft, String > unwrapRight) > {code} > These methods unwraps (fully or not) the string parameter. See pull request > for usage examples. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-1014) Adding unwrap and unwrapFull methods to StringUtils
[ https://issues.apache.org/jira/browse/LANG-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14548424#comment-14548424 ] Sebb commented on LANG-1014: I still cannot see when one might want to use these methods. There's no point adding these methods and maintaining them unless they are actually going to be needed. What sort of application has strings that actually need unwrapping? Adding unwrap and unwrapFull methods to StringUtils --- Key: LANG-1014 URL: https://issues.apache.org/jira/browse/LANG-1014 Project: Commons Lang Issue Type: New Feature Components: lang.* Reporter: Thiago Andrade Assignee: Benedikt Ritter Labels: github Fix For: Review Patch, Discussion Placeholder ticket for github PR 25: https://github.com/apache/commons-lang/pull/25 Adding the following methods from StringUtils: {code:java} public static String unwrap(String str, char unwrapChar) public static String unwrapFull(String str, char unwrapChar) public static String unwrap(String str, String unwrapStr) public static String unwrapFull(String str, String unwrapStr) public static String unwrap(String str, String unwrapLeft, String unwrapRight) public static String unwrapFull(String str, String unwrapLeft, String unwrapRight) {code} These methods unwraps (fully or not) the string parameter. See pull request for usage examples. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-1014) Adding unwrap and unwrapFull methods to StringUtils
[ https://issues.apache.org/jira/browse/LANG-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14514821#comment-14514821 ] ASF GitHub Bot commented on LANG-1014: -- GitHub user thiagoh reopened a pull request: https://github.com/apache/commons-lang/pull/25 Adding unwrap and unwrapFull methods to StringUtils Adding the following methods from `StringUtils`: * `public static String unwrap(String str, char unwrapChar)` * `public static String unwrapFull(String str, char unwrapChar)` * `public static String unwrap(String str, String unwrapStr)` * `public static String unwrapFull(String str, String unwrapStr)` * `public static String unwrap(String str, String unwrapLeft, String unwrapRight)` * `public static String unwrapFull(String str, String unwrapLeft, String unwrapRight)` These methods unwraps (fully or not) the string parameter Usage: ``` // public static String unwrap(String str, char unwrapChar) StringUtils.unwrap(, '\0') = StringUtils.unwrap(xabx, 'x') = ab StringUtils.unwrap(\ab\, '\') = ab StringUtils.unwrap(\\ab\\, '\') = \ab\ StringUtils.unwrap('ab', '\'') = ab StringUtils.unwrap(''ab'', '\'') = 'ab' StringUtils.unwrap('''ab''', '\'') = ''ab'' StringUtils.unwrap('\abcd\', '\'') = \abcd\ StringUtils.unwrap('\abcd\', '\') = '\abcd\' // public static String unwrapFull(String str, char unwrapChar) StringUtils.unwrapFull(, '\0') = StringUtils.unwrapFull(xabx, 'x') = ab StringUtils.unwrapFull(xxabxx, 'x') = ab StringUtils.unwrapFull(\ab\, '\') = ab StringUtils.unwrapFull(\\ab\\, '\') = ab StringUtils.unwrapFull('ab', '\'') = ab StringUtils.unwrapFull('x'ab'x', '\'') = x'ab'x StringUtils.unwrapFull(''ab'', '\'') = ab StringUtils.unwrapFull('ab', '\'') = ab StringUtils.unwrapFull(x'ab', '\'') = x'ab' StringUtils.unwrapFull('ab, '\'') = ab''' // public static String unwrap(String str, String unwrapStr) StringUtils.unwrap(xxabxx, xx) = ab StringUtils.unwrap(ab, xx) = xxabxx StringUtils.unwrap(xx xxabxx xx, xx) = xxabxx StringUtils.unwrap(xxZxx, xx) = Z StringUtils.unwrap(xxZxx, x) = xZx StringUtils.unwrap(xzx xzx, xzx) = StringUtils.unwrap( , xx) = xx xx StringUtils.unwrap('name', ') = name StringUtils.unwrap(''name'', ') = 'name' StringUtils.unwrap('''name''', ') = ''name'' // public static String unwrapFull(String str, String unwrapStr) StringUtils.unwrapFull(xxabxx, x) = ab StringUtils.unwrapFull(xx xxabxx xx, xx) = ab StringUtils.unwrapFull(xxZxx, xx) = Z StringUtils.unwrapFull(xzx xzx, xzx) = StringUtils.unwrapFull( , xx) = StringUtils.unwrapFull('name', ') = name StringUtils.unwrapFull(''name'', ') = name StringUtils.unwrapFull('''name''', ') = name // public static String unwrap(String str, String unwrapLeft, String unwrapRight) StringUtils.unwrap(xxabxx, x, x) = ab StringUtils.unwrap(xx xxabxx xx, xx, xx) = ab StringUtils.unwrap(xxZxx, xx, xx) = Z StringUtils.unwrap(xxZxx, xx, yy) = xxZxx // no unwrap StringUtils.unwrap(xzx xzx, xzx, xzx) = StringUtils.unwrap( , xx, xx) = StringUtils.unwrap( , xx, yy) = // no unwrap StringUtils.unwrap(xxoutputxx, x, x) = output StringUtils.unwrap(%{name}, %{, }) = name StringUtils.unwrap(%{ name}, %{, }) = name StringUtils.unwrap(%{ name }, %{, }) = name StringUtils.unwrap( %{ name }, %{, }) = name StringUtils.unwrap(%{'name'}, %{', '}) = name StringUtils.unwrap(%{' name'}, %{', '}) = name StringUtils.unwrap(%{' name '}, %{', '}) = name StringUtils.unwrap( %{' name '}, %{', '}) = name StringUtils.unwrap(%{ 'name'}, %{', '}) = %{ 'name'} // no unwrap StringUtils.unwrap(% {'name'}, %{', '}) = % {'name'} // no unwrap StringUtils.unwrap(% { 'name'}, %{', '}) = % { 'name'} // no unwrap // public static String unwrapFull(String str, String unwrapLeft, String unwrapRight) StringUtils.unwrapFull(xxabxx, x, x) = ab StringUtils.unwrapFull(xx xxabxx xx, xx, xx) = ab StringUtils.unwrapFull(xxZxx, xx, xx) = Z StringUtils.unwrapFull(xxZxx, xx, yy) = xxZxx // no unwrap StringUtils.unwrapFull(xzx xzx, xzx, xzx) = StringUtils.unwrapFull( , xx, xx) = StringUtils.unwrapFull( , xx, yy) = // no unwrap StringUtils.unwrapFull(xxoutputxx, x, x) = output StringUtils.unwrapFull(%{name}, %{, }) = name StringUtils.unwrapFull(%{ name}, %{, }) = name StringUtils.unwrapFull(%{ name }, %{, }) = name StringUtils.unwrapFull( %{ name }, %{, }) = name StringUtils.unwrapFull(%{'name'}, %{', '}) = name StringUtils.unwrapFull(%{'
[jira] [Commented] (LANG-1014) Adding unwrap and unwrapFull methods to StringUtils
[ https://issues.apache.org/jira/browse/LANG-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14514741#comment-14514741 ] ASF GitHub Bot commented on LANG-1014: -- Github user asfgit closed the pull request at: https://github.com/apache/commons-lang/pull/25 Adding unwrap and unwrapFull methods to StringUtils --- Key: LANG-1014 URL: https://issues.apache.org/jira/browse/LANG-1014 Project: Commons Lang Issue Type: New Feature Components: lang.* Reporter: Thiago Andrade Assignee: Benedikt Ritter Labels: github Fix For: Review Patch Placeholder ticket for github PR 25: https://github.com/apache/commons-lang/pull/25 Adding the following methods from StringUtils: {code:java} public static String unwrap(String str, char unwrapChar) public static String unwrapFull(String str, char unwrapChar) public static String unwrap(String str, String unwrapStr) public static String unwrapFull(String str, String unwrapStr) public static String unwrap(String str, String unwrapLeft, String unwrapRight) public static String unwrapFull(String str, String unwrapLeft, String unwrapRight) {code} These methods unwraps (fully or not) the string parameter. See pull request for usage examples. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-1014) Adding unwrap and unwrapFull methods to StringUtils
[ https://issues.apache.org/jira/browse/LANG-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14172947#comment-14172947 ] Sebb commented on LANG-1014: What are the use-cases for these methods? Adding unwrap and unwrapFull methods to StringUtils --- Key: LANG-1014 URL: https://issues.apache.org/jira/browse/LANG-1014 Project: Commons Lang Issue Type: New Feature Components: lang.* Reporter: Thiago Andrade Assignee: Benedikt Ritter Labels: github Fix For: Review Patch Placeholder ticket for github PR 25: https://github.com/apache/commons-lang/pull/25 Adding the following methods from StringUtils: {code:java} public static String unwrap(String str, char unwrapChar) public static String unwrapFull(String str, char unwrapChar) public static String unwrap(String str, String unwrapStr) public static String unwrapFull(String str, String unwrapStr) public static String unwrap(String str, String unwrapLeft, String unwrapRight) public static String unwrapFull(String str, String unwrapLeft, String unwrapRight) {code} These methods unwraps (fully or not) the string parameter. See pull request for usage examples. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (LANG-1014) Adding unwrap and unwrapFull methods to StringUtils
[ https://issues.apache.org/jira/browse/LANG-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14172960#comment-14172960 ] Thiago Andrade commented on LANG-1014: -- Usage: // public static String unwrap(String str, char unwrapChar) StringUtils.unwrap(, '\0') = StringUtils.unwrap(xabx, 'x') = ab StringUtils.unwrap(\ab\, '\') = ab StringUtils.unwrap(\\ab\\, '\') = \ab\ StringUtils.unwrap('ab', '\'') = ab StringUtils.unwrap(''ab'', '\'') = 'ab' StringUtils.unwrap('''ab''', '\'') = ''ab'' StringUtils.unwrap('\abcd\', '\'') = \abcd\ StringUtils.unwrap('\abcd\', '\') = '\abcd\' // public static String unwrapFull(String str, char unwrapChar) StringUtils.unwrapFull(, '\0') = StringUtils.unwrapFull(xabx, 'x') = ab StringUtils.unwrapFull(xxabxx, 'x') = ab StringUtils.unwrapFull(\ab\, '\') = ab StringUtils.unwrapFull(\\ab\\, '\') = ab StringUtils.unwrapFull('ab', '\'') = ab StringUtils.unwrapFull('x'ab'x', '\'') = x'ab'x StringUtils.unwrapFull(''ab'', '\'') = ab StringUtils.unwrapFull('ab', '\'') = ab StringUtils.unwrapFull(x'ab', '\'') = x'ab' StringUtils.unwrapFull('ab, '\'') = ab''' // public static String unwrap(String str, String unwrapStr) StringUtils.unwrap(xxabxx, xx) = ab StringUtils.unwrap(ab, xx) = xxabxx StringUtils.unwrap(xx xxabxx xx, xx) = xxabxx StringUtils.unwrap(xxZxx, xx) = Z StringUtils.unwrap(xxZxx, x) = xZx StringUtils.unwrap(xzx xzx, xzx) = StringUtils.unwrap( , xx) = xx xx StringUtils.unwrap('name', ') = name StringUtils.unwrap(''name'', ') = 'name' StringUtils.unwrap('''name''', ') = ''name'' // public static String unwrapFull(String str, String unwrapStr) StringUtils.unwrapFull(xxabxx, x) = ab StringUtils.unwrapFull(xx xxabxx xx, xx) = ab StringUtils.unwrapFull(xxZxx, xx) = Z StringUtils.unwrapFull(xzx xzx, xzx) = StringUtils.unwrapFull( , xx) = StringUtils.unwrapFull('name', ') = name StringUtils.unwrapFull(''name'', ') = name StringUtils.unwrapFull('''name''', ') = name // public static String unwrap(String str, String unwrapLeft, String unwrapRight) StringUtils.unwrap(xxabxx, x, x) = ab StringUtils.unwrap(xx xxabxx xx, xx, xx) = ab StringUtils.unwrap(xxZxx, xx, xx) = Z StringUtils.unwrap(xxZxx, xx, yy) = xxZxx // no unwrap StringUtils.unwrap(xzx xzx, xzx, xzx) = StringUtils.unwrap( , xx, xx) = StringUtils.unwrap( , xx, yy) = // no unwrap StringUtils.unwrap(xxoutputxx, x, x) = output StringUtils.unwrap(%{name}, %{, }) = name StringUtils.unwrap(%{ name}, %{, }) = name StringUtils.unwrap(%{ name }, %{, }) = name StringUtils.unwrap( %{ name }, %{, }) = name StringUtils.unwrap(%{'name'}, %{', '}) = name StringUtils.unwrap(%{' name'}, %{', '}) = name StringUtils.unwrap(%{' name '}, %{', '}) = name StringUtils.unwrap( %{' name '}, %{', '}) = name StringUtils.unwrap(%{ 'name'}, %{', '}) = %{ 'name'} // no unwrap StringUtils.unwrap(% {'name'}, %{', '}) = % {'name'} // no unwrap StringUtils.unwrap(% { 'name'}, %{', '}) = % { 'name'} // no unwrap // public static String unwrapFull(String str, String unwrapLeft, String unwrapRight) StringUtils.unwrapFull(xxabxx, x, x) = ab StringUtils.unwrapFull(xx xxabxx xx, xx, xx) = ab StringUtils.unwrapFull(xxZxx, xx, xx) = Z StringUtils.unwrapFull(xxZxx, xx, yy) = xxZxx // no unwrap StringUtils.unwrapFull(xzx xzx, xzx, xzx) = StringUtils.unwrapFull( , xx, xx) = StringUtils.unwrapFull( , xx, yy) = // no unwrap StringUtils.unwrapFull(xxoutputxx, x, x) = output StringUtils.unwrapFull(%{name}, %{, }) = name StringUtils.unwrapFull(%{ name}, %{, }) = name StringUtils.unwrapFull(%{ name }, %{, }) = name StringUtils.unwrapFull( %{ name }, %{, }) = name StringUtils.unwrapFull(%{'name'}, %{', '}) = name StringUtils.unwrapFull(%{' name'}, %{', '}) = name StringUtils.unwrapFull(%{' name '}, %{', '}) = name StringUtils.unwrapFull( %{' name '}, %{', '}) = name StringUtils.unwrapFull(%{ 'name'}, %{', '}) = %{ 'name'} // no unwrap StringUtils.unwrapFull(% {'name'}, %{', '}) = % {'name'} // no unwrap StringUtils.unwrapFull(% { 'name'}, %{', '}) = % { 'name'} // no unwrap Adding unwrap and unwrapFull methods to StringUtils --- Key: LANG-1014 URL: https://issues.apache.org/jira/browse/LANG-1014 Project: Commons Lang Issue Type: New Feature Components: lang.* Reporter: Thiago Andrade Assignee: Benedikt Ritter Labels: github Fix For: Review Patch Placeholder ticket for github PR 25: https://github.com/apache/commons-lang/pull/25 Adding the following methods from StringUtils: {code:java} public static String unwrap(String str, char unwrapChar) public static String unwrapFull(String str, char unwrapChar)
[jira] [Commented] (LANG-1014) Adding unwrap and unwrapFull methods to StringUtils
[ https://issues.apache.org/jira/browse/LANG-1014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14172964#comment-14172964 ] Sebb commented on LANG-1014: Thanks, but those are just examples of how to call the methods. Why would code need to call the methods? What purpose do they serve in an actual application? Adding unwrap and unwrapFull methods to StringUtils --- Key: LANG-1014 URL: https://issues.apache.org/jira/browse/LANG-1014 Project: Commons Lang Issue Type: New Feature Components: lang.* Reporter: Thiago Andrade Assignee: Benedikt Ritter Labels: github Fix For: Review Patch Placeholder ticket for github PR 25: https://github.com/apache/commons-lang/pull/25 Adding the following methods from StringUtils: {code:java} public static String unwrap(String str, char unwrapChar) public static String unwrapFull(String str, char unwrapChar) public static String unwrap(String str, String unwrapStr) public static String unwrapFull(String str, String unwrapStr) public static String unwrap(String str, String unwrapLeft, String unwrapRight) public static String unwrapFull(String str, String unwrapLeft, String unwrapRight) {code} These methods unwraps (fully or not) the string parameter. See pull request for usage examples. -- This message was sent by Atlassian JIRA (v6.3.4#6332)