comparison string.rhope @ 99:e09c2d1d6d5b

Got dataflow graph code working in compiler (nworker_c.rhope)
author Mike Pavone <pavone@retrodev.com>
date Fri, 06 Aug 2010 01:42:37 -0400
parents e73a93fb5de1
children f51c4c17457c
comparison
equal deleted inserted replaced
98:a34a982ecd32 99:e09c2d1d6d5b
645 { 645 {
646 ,compare <- [thing]Slice[ [[thing]Length] - [[ends with]Length] ] 646 ,compare <- [thing]Slice[ [[thing]Length] - [[ends with]Length] ]
647 out <- [compare] = [ends with] 647 out <- [compare] = [ends with]
648 } 648 }
649 649
650 If@String[str:yes,no]
651 {
652 yes,no <- If[[str]Length]
653 }
654
655 If@String Cat[str:yes,no]
656 {
657 yes,no <- If[[str]Length]
658 }
659
660 If@String Slice[str:yes,no]
661 {
662 yes,no <- If[[str]Length]
663 }
664
665 _Split[list,string,delim:out]
666 {
667 ,,rest <- [string]Partition[delim]
668 {
669 out <- _Split[[list]Append[~], rest, delim]
670 } {} {} {
671 out <- [list]Append[string]
672 }
673 }
674
675 Split[string,delim:out]
676 {
677 If[string]
678 { out <- _Split[(),string,delim] }
679 { out <- () }
680 }
681