Venus

 view release on metacpan or  search on metacpan

lib/Venus/Range.pm  view on Meta::CPAN

  # ['c', 'e', 'g', 'i']

=back

=cut

=head2 split

  split(number $index) (tuple[arrayref, arrayref])

The split method splits the elements into two sets of elements at the index
specific and returns a tuple of two arrayrefs. The first arrayref will include
everything L<"before"|/before> the index provided, and the second tuple will
include everything L<"after"|/after> the index provided. This operation will
always exclude the element at the index the elements are split on. See
L</partition> for an inclusive split operation.

I<Since C<4.15>>

=over 4

lib/Venus/String.pm  view on Meta::CPAN

  # "hello_world"

=back

=cut

=head2 split

  split(string | regexp $expr, maybe[number] $limit) (arrayref)

The split method returns an arrayref by splitting the string on the argument.

I<Since C<0.01>>

=over 4

=item split example 1

  package main;

  use Venus::String;

t/Venus_Range.t  view on Meta::CPAN

$test->for('example', 5, 'select', sub {
  my ($tryable) = @_;
  my $result = $tryable->result;
  is_deeply $result, ['c', 'e', 'g', 'i'];

  $result
});

=method split

The split method splits the elements into two sets of elements at the index
specific and returns a tuple of two arrayrefs. The first arrayref will include
everything L<"before"|/before> the index provided, and the second tuple will
include everything L<"after"|/after> the index provided. This operation will
always exclude the element at the index the elements are split on. See
L</partition> for an inclusive split operation.

=signature split

  split(number $index) (tuple[arrayref, arrayref])

t/Venus_String.t  view on Meta::CPAN

$test->for('example', 1, 'snakecase', sub {
  my ($tryable) = @_;
  ok my $result = $tryable->result;
  ok $result eq "hello_world";

  $result
});

=method split

The split method returns an arrayref by splitting the string on the argument.

=signature split

  split(string | regexp $expr, maybe[number] $limit) (arrayref)

=metadata split

{
  since => '0.01',
}



( run in 0.921 second using v1.01-cache-2.11-cpan-71847e10f99 )