Beispiel #1
0
 public static function substrs($string, $length, $start = 0, $dot = false)
 {
     return WindString::substr($string, $start, $length, self::client()->clientCharser);
 }
Beispiel #2
0
 private static function _writeImage()
 {
     for ($i = 0; $i < self::$_codeLen; $i++) {
         //$_text = Pw::substrs(self::$verifyCode, 1, $i, false);
         $_text = WindString::substr(self::$verifyCode, $i, 1, 'utf-8', false);
         self::_setRandSize();
         self::_setRandAngle();
         self::_setRandX();
         self::_setRandY();
         self::_setRandColor();
         ImageTTFText(self::$_image, self::$_size, self::$_angle, self::$_codeX * $i + 10, self::$_codeY, self::$_color, self::$_font, $_text);
     }
 }
Beispiel #3
0
	/**
	 * 字符串截取
	 *
	 * @param string $string
	 * @param int $length
	 * @param int $start
	 * @param bool $dot
	 */
	public static function substrs($string, $length, $start = 0, $dot = true) {
		if (self::strlen($string) <= $length) return $string;
		return WindString::substr($string, $start, $length, Wekit::V('charset'), $dot);
	}
Beispiel #4
0
 /**
  * 字符串截取
  *
  * @param string $string
  * @param int $length
  * @param int $start
  * @param bool $dot
  */
 public static function substrs($string, $length, $start = 0, $dot = true)
 {
     return WindString::substr($string, $start, $length, Wekit::app()->charset, $dot);
 }