コード例 #1
0
ファイル: Module.php プロジェクト: bluesnowman/fphp-saber
 /**
  * This method returns a tuple where the first item contains the first "n" characters
  * in the string and the second item contains the remainder.
  *
  * @access public
  * @static
  * @param IString\Type $xs                                  the string
  * @param IInt32\Type $n                                    the number of characters to take
  * @return ITuple\Type                                      the tuple
  */
 public static function split(IString\Type $xs, IInt32\Type $n) : ITuple\Type
 {
     return ITuple\Type::box2(IString\Module::take($xs, $n), IString\Module::drop($xs, $n));
 }