KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > intro > universal > util > StringUtil


1 /*******************************************************************************
2  * Copyright (c) 2004, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal.intro.universal.util;
12
13
14
15 public class StringUtil {
16
17     public static StringBuffer JavaDoc concat(String JavaDoc string1, String JavaDoc string2,
18             String JavaDoc string3) {
19         StringBuffer JavaDoc buffer = new StringBuffer JavaDoc(string1);
20         buffer.append(string2);
21         buffer.append(string3);
22         return buffer;
23     }
24
25     public static StringBuffer JavaDoc concat(String JavaDoc string1, String JavaDoc string2,
26             String JavaDoc string3, String JavaDoc string4) {
27         StringBuffer JavaDoc buffer = concat(string1, string2, string3);
28         buffer.append(string4);
29         return buffer;
30     }
31
32     public static StringBuffer JavaDoc concat(String JavaDoc string1, String JavaDoc string2,
33             String JavaDoc string3, String JavaDoc string4, String JavaDoc string5) {
34         StringBuffer JavaDoc buffer = concat(string1, string2, string3, string4);
35         buffer.append(string5);
36         return buffer;
37     }
38
39     public static StringBuffer JavaDoc concat(String JavaDoc string1, String JavaDoc string2,
40             String JavaDoc string3, String JavaDoc string4, String JavaDoc string5, String JavaDoc string6) {
41         StringBuffer JavaDoc buffer = concat(string1, string2, string3, string4,
42             string5);
43         buffer.append(string6);
44         return buffer;
45     }
46
47
48
49 }
50
Popular Tags