FileDocCategorySizeDatePackage
CVS.javaAPI DocExample1675Sat Sep 12 03:01:00 BST 1998borland.samples.apps.chess.client

CVS.java

/*
 * Copyright (c) 1997-1998 Borland International, Inc. All Rights Reserved.
 * 
 * This SOURCE CODE FILE, which has been provided by Borland as part
 * of a Borland product for use ONLY by licensed users of the product,
 * includes CONFIDENTIAL and PROPRIETARY information of Borland.  
 *
 * USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS 
 * OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
 * THE PRODUCT.
 *
 * IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD BORLAND, ITS RELATED
 * COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY CLAIMS
 * OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR DISTRIBUTION
 * OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES ARISING OUT OF
 * OR RESULTING FROM THE USE, MODIFICATION, OR DISTRIBUTION OF PROGRAMS
 * OR FILES CREATED FROM, BASED ON, AND/OR DERIVED FROM THIS SOURCE
 * CODE FILE.
 */
package borland.samples.apps.chess.client ;

/**Contains all the strings used in the ChessViewer package that need localization...
*/
public class CVS
{


  /**Helper method for sticking variables into the string.
  * Searches the string for a % and then substitutes the variable
  */
  public static String Insert(String template, String snippet) {
    int index = template.indexOf('%') ;
    return template.substring(0, index) + snippet + template.substring(index+1);
  }
  
  /**Helper method for sticking variables into the string.
  * Searches the string for a % and then substitutes the variable
  */
  public static String Insert(String template, String snippet1, String snippet2) {
    return Insert(Insert(template, snippet1), snippet2);
  }
}