@@ -871,6 +871,35 @@ generate_pattern_iterators! {
871871 delegate double ended;
872872}
873873
874+ split_internal ! {
875+ SplitInitiatorInternal {
876+ debug: "SplitInitiatorInternal" ,
877+ skip_leading_empty: skip_leading_empty,
878+ include_leading: false ,
879+ include_trailing: false ,
880+ }
881+ }
882+
883+ generate_pattern_iterators ! {
884+ forward:
885+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
886+ #[ fused( unstable( feature = "split_inclusive_variants" , issue = "none" ) ) ]
887+ /// Created with the method [`split_initiator`].
888+ ///
889+ /// [`split_initiator`]: str::split_initiator
890+ struct SplitInitiator ;
891+ reverse:
892+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
893+ #[ fused( unstable( feature = "split_inclusive_variants" , issue = "none" ) ) ]
894+ /// Created with the method [`rsplit_initiator`].
895+ ///
896+ /// [`rsplit_initiator`]: str::rsplit_initiator
897+ struct RSplitInitiator ;
898+ internal:
899+ SplitInitiatorInternal yielding ( & ' a str ) ;
900+ delegate double ended;
901+ }
902+
874903split_internal ! {
875904 SplitTerminatorInternal {
876905 debug: "SplitTerminatorInternal" ,
@@ -900,6 +929,36 @@ generate_pattern_iterators! {
900929 delegate double ended;
901930}
902931
932+ split_internal ! {
933+ SplitEndsInternal {
934+ debug: "SplitEndsInternal" ,
935+ skip_leading_empty: skip_leading_empty,
936+ skip_trailing_empty: skip_trailing_empty,
937+ include_leading: false ,
938+ include_trailing: false ,
939+ }
940+ }
941+
942+ generate_pattern_iterators ! {
943+ forward:
944+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
945+ #[ fused( unstable( feature = "split_inclusive_variants" , issue = "none" ) ) ]
946+ /// Created with the method [`split_ends`].
947+ ///
948+ /// [`split_ends`]: str::split_ends
949+ struct SplitEnds ;
950+ reverse:
951+ #[ unstable( feature = "split_inclusive_variants" , issue = "none" ) ]
952+ #[ fused( unstable( feature = "split_inclusive_variants" , issue = "none" ) ) ]
953+ /// Created with the method [`rsplit_ends`].
954+ ///
955+ /// [`rsplit_ends`]: str::rsplit_ends
956+ struct RSplitEnds ;
957+ internal:
958+ SplitEndsInternal yielding ( & ' a str ) ;
959+ delegate double ended;
960+ }
961+
903962impl < ' a , P : Pattern < ' a > > SplitTerminator < ' a , P > {
904963 /// Returns remainder of the split string
905964 ///
0 commit comments