Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id ACF98200B32 for ; Tue, 24 May 2016 16:57:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id AC08F16098E; Tue, 24 May 2016 14:57:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 24F8E160A35 for ; Tue, 24 May 2016 16:57:13 +0200 (CEST) Received: (qmail 15557 invoked by uid 500); 24 May 2016 14:57:13 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 15230 invoked by uid 99); 24 May 2016 14:57:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 May 2016 14:57:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D8D8F2C1F62 for ; Tue, 24 May 2016 14:57:12 +0000 (UTC) Date: Tue, 24 May 2016 14:57:12 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LANG-1237) String Split For Fixed-Length Strings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 24 May 2016 14:57:14 -0000 [ https://issues.apache.org/jira/browse/LANG-1237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15298308#comment-15298308 ] Sebb commented on LANG-1237: ---------------------------- What is the use case for this? And why choose a 0-based index rather than the lengths of each sub-string - or some other way of defining the split locations? > String Split For Fixed-Length Strings > ------------------------------------- > > Key: LANG-1237 > URL: https://issues.apache.org/jira/browse/LANG-1237 > Project: Commons Lang > Issue Type: New Feature > Components: lang.text.* > Reporter: BELUGA BEHR > > Create a StringSplit method that splits on defined boundaries. > {code:java} > /** > * Used for fixed-length string formats > * splitOnBoundary("HelloBigWorld", 4); > * Returns ["Hello","BigWorld"] > * > * splitOnBoundary("HelloBigWorld", 4, 7); > * Returns ["Hello","Big","World"] > */ > String[] splitOnBoundary(String str, int... boundary); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)