示例#1
0
 public function testFnToLower()
 {
     $fn = FnString::fnToLower();
     $this->assertEquals('hello', $fn('HELLO'));
     $fn = FnString::fnToLower('UTF-8');
     $this->assertEquals('hello', $fn('HELLO'));
     $this->assertEquals('hellö', $fn('HELLÖ'));
     $this->assertNotEquals(strtolower('HELLÖ'), $fn('HELLÖ'));
 }
示例#2
0
 /**
  * @return TraverseSequence|MappedSequence
  */
 public function getChildren()
 {
     $x = $this->current();
     if ($this->canGoDeeper()) {
         return TraverseSequence::make($x, $this->key(), $this->pathSeparator)->setMaxDepth($this->depth - 1);
     } else {
         return IterationTraits::map(Sequence::make($x), FnGen::fnIdentity(), FnString::fnAddPrefix($this->key() . $this->pathSeparator));
     }
 }