package com.haxademic.core.data;

public class ConvertUtil {
	
	// from string

	public static int stringToInt( String str ) {
		return Integer.parseInt( str );
	}
	
	public static float stringToFloat( String str ) {
		return Float.valueOf( str );
	}
	
	public static boolean stringToBoolean( String bool ) {
		return (bool.equals("true")) ? true : false;
	}
	
	// to string

	public static String intToString( int number ) {
		return Integer.toString( number );
	}
	
	public static String floatToString( float number ) {
		return Float.toString( number );
	}
}




@@ -553,13 +553,194 @@
 r );%0A%09%7D%0A
+%09%0A%09// bytes%0A%09%0A%09public static byte intToByte( int number ) %7B%0A%09%09return (byte) number;%0A%09%7D%0A%09%0A%09public static int byteToInt( byte b ) %7B%0A%09%09return b & 0xFF;%09// returns an unsigned int%0A%09%7D%0A%09%0A
 %7D%0A%0A%0A%0A

Add byte <-> int conversion methods