[GitHub] commons-lang issue #136: Adding unwrap and unwrapFull methods to StringUtils
Github user thiagoh commented on the issue: https://github.com/apache/commons-lang/pull/136 Don't worry @PascalSchumacher I understand! Thank you, anyway --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] commons-lang issue #137: Adding to StringUtils truncate method and test case...
Github user thiagoh commented on the issue: https://github.com/apache/commons-lang/pull/137 @PascalSchumacher I think now thats. Could you confirm that? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] commons-lang issue #137: Adding to StringUtils truncate method and test case...
Github user thiagoh commented on the issue: https://github.com/apache/commons-lang/pull/137 @PascalSchumacher can you check this out? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] commons-lang pull request: Adding to StringUtils truncate method a...
Github user thiagoh commented on the pull request: https://github.com/apache/commons-lang/pull/137#issuecomment-01726 @PascalSchumacher sure! I'll fix it --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] commons-lang pull request: Adding unwrap and unwrapFull methods to...
Github user thiagoh commented on the pull request: https://github.com/apache/commons-lang/pull/136#issuecomment-218870251 @garydgregory I guess you're right.. shall I do that, people? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] commons-lang pull request: Adding to StringUtils truncate method a...
Github user thiagoh closed the pull request at: https://github.com/apache/commons-lang/pull/24 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] commons-lang pull request: Adding to StringUtils truncate method a...
GitHub user thiagoh opened a pull request: https://github.com/apache/commons-lang/pull/137 Adding to StringUtils truncate method and test cases Adding the following methods from `StringUtils`: * `public static String truncate(final String str, final int maxWidth)` * `public static String truncate(final String str, int offset, final int maxWidth)` For example ``` StringUtils.truncate("abcdefg", 4) = "abcd" StringUtils.truncate("abcdefg", 6) = "abcdef" StringUtils.truncate("abcdefg", 7) = "abcdefg" StringUtils.truncate("abcdefg", 8) = "abcdefg" StringUtils.truncate("abcdefghijklmno", -1, 10) = "abcdefghij" StringUtils.truncate("abcdefghijklmno", 0, 10) = "abcdefghij" StringUtils.truncate("abcdefghijklmno", Integer.MIN_VALUE, 10) = "abcdefghij" StringUtils.truncate("abcdefghijklmno", Integer.MIN_VALUE, Integer.MAX_VALUE) = "abcdefghijklmno" StringUtils.truncate("abcdefghijklmno", 0, Integer.MAX_VALUE) = "abcdefghijklmno" StringUtils.truncate("abcdefghijklmno", 1, 10) = "bcdefghijk" StringUtils.truncate("abcdefghijklmno", 2, 10) = "cdefghijkl" StringUtils.truncate("abcdefghijklmno", 3, 10) = "defghijklm" StringUtils.truncate("abcdefghijklmno", 4, 10) = "efghijklmn" StringUtils.truncate("abcdefghijklmno", 5, 10) = "fghijklmno" StringUtils.truncate("abcdefghijklmno", 5, 5) = "fghij" StringUtils.truncate("abcdefghijklmno", 5, 3) = "fgh" StringUtils.truncate("abcdefghijklmno", 10, 3) = "klm" StringUtils.truncate("abcdefghijklmno", 10, Integer.MAX_VALUE) = "klmno" StringUtils.truncate("abcdefghijklmno", 13, 1) = "n" StringUtils.truncate("abcdefghijklmno", 13, Integer.MAX_VALUE) = "no" StringUtils.truncate("abcdefghijklmno", 14, 1) = "o" StringUtils.truncate("abcdefghijklmno", 14, Integer.MAX_VALUE) = "o" ``` @britter I'm rebasing this PR because of my old PR #24. Could you check it? Thanks You can merge this pull request into a Git repository by running: $ git pull https://github.com/thiagoh/commons-lang branch-truncate Alternatively you can review and apply these changes as the patch at: https://github.com/apache/commons-lang/pull/137.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #137 commit f644d6a499b2011c7505c1d9002d6b94d3a86e10 Author: Thiago Andrade Date: 2016-04-24T17:34:48Z adding truncate method to StringUtils --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] commons-lang pull request: Adding unwrap and unwrapFull methods to...
GitHub user thiagoh opened a pull request: https://github.com/apache/commons-lang/pull/136 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" StringUti
[GitHub] commons-lang pull request: Adding unwrap and unwrapFull methods to...
Github user thiagoh closed the pull request at: https://github.com/apache/commons-lang/pull/25 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] commons-lang pull request: Adding unwrap and unwrapFull methods to...
Github user thiagoh commented on the pull request: https://github.com/apache/commons-lang/pull/25#issuecomment-101049295 Hi @britter have these methods been already added to the trunk? shouldn't we finish this PR? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] commons-lang pull request: LANG-1124: Add StringUtils split by len...
Github user thiagoh commented on the pull request: https://github.com/apache/commons-lang/pull/75#issuecomment-101048576 is this finished? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] commons-lang pull request: Adding unwrap and unwrapFull methods to...
Github user thiagoh commented on the pull request: https://github.com/apache/commons-lang/pull/25#issuecomment-96798120 Hi @britter what should I do by now? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---