libbluray | branch: master | hpi1 <[email protected]> | Sat Mar 16 14:20:13 2013 +0200| [6d41b87481a87a5943385a47fbaaf2ab10735fe7] | committer: hpi1
Added StrUtil.Join() > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=6d41b87481a87a5943385a47fbaaf2ab10735fe7 --- src/libbluray/bdj/java/org/videolan/StrUtil.java | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/libbluray/bdj/java/org/videolan/StrUtil.java b/src/libbluray/bdj/java/org/videolan/StrUtil.java index 41fa715..f7f99b2 100644 --- a/src/libbluray/bdj/java/org/videolan/StrUtil.java +++ b/src/libbluray/bdj/java/org/videolan/StrUtil.java @@ -1,8 +1,38 @@ +/* + * This file is part of libbluray + * Copyright (C) 2010 Libbluray + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * <http://www.gnu.org/licenses/>. + */ + package org.videolan; import java.util.ArrayList; public class StrUtil { + public static String Join(String[] strings, String separator) { + String result = ""; + if (strings != null) { + result = strings[0]; + for (int i = 1; i < strings.length; i++) { + result = result + separator + strings[i]; + } + } + return result; + } + public static String[] split(String str, char delimiter) { ArrayList elements = new ArrayList(); int i, j = 0, len = str.length(); _______________________________________________ libbluray-devel mailing list [email protected] http://mailman.videolan.org/listinfo/libbluray-devel
