All pastes #61801 Raw Edit

Miscellany

public text v1 · immutable
#61801 ·published 2006-06-04 19:21 UTC
rendered paste body
import java.io.*;
import java.lang.*;

class Token
{ 
	String token = "<example>";
	
 static boolean  isLabel(){

	 boolean x=false;
	 int[] theString={};

         int[] str=new int[theString.length];
	 int[] f=new int[theString.length];

	 int temp = str.length-1;
	 for (int i=0; i<str.length; i++){
		if( str[0]=="<" && str[temp]==">"){
				x=true;
		}
	 }
	
         return x;
}
	
	
String readLabel(){

	boolean b = this.isLabel();	

        return (b)?this.substring(indexOf("<")+1,indexOf(">")-1):null;
        
}
		
static boolean isEndLabel(){

	String x;
	boolean b = false;
	int i;

	String str[] = new String[50];

		if (!this.readLabel())
		{
			System.out.println("einai null");
			System.exit(0);
		}
// to string na ginetai se pinaka. dhladh to string x ston pinaka str
		
		if(str[0]=="/")
		{
			b=true;
		}
		return b;
	} //end function
	
}  //end class