コード例 #1
0
ファイル: CUString.php プロジェクト: nunodotferreira/Phred
 /**
  * Converts a string with an arbitrary-base integer into the corresponding integer value.
  *
  * The string may be prefixed with "0x" for the base of 16.
  *
  * @param  string $string The string to be converted.
  * @param  int $base The base in which the integer is represented by the string. Can be a number in the range from
  * 2 to 36.
  *
  * @return int The integer value represented by the string.
  */
 public static function toIntFromBase($string, $base)
 {
     assert('is_cstring($string) && is_int($base)', vs(isset($this), get_defined_vars()));
     return CString::toIntFromBase($string, $base);
 }