コード例 #1
0
 /**
  * When first chunk is a NULL string then return null value.
  */
 public function testWhenFirstChunkIsANULLStringThenReturnNullValue()
 {
     $response = String::getFirstChunk('NULL or something "fun"');
     static::assertNull($response);
 }
コード例 #2
0
 public static function extractFieldDefault($fieldString, $field)
 {
     $stringUtils = new String(stripslashes($fieldString));
     $field->Default = String::getFirstChunk($stringUtils->substr('/DEFAULT\\s/'));
     if ($field->Type === 'INT') {
         $field->Default = (int) $field->Default;
     }
 }