1 package Moose::Autobox::String;
6 with 'Moose::Autobox::Value';
10 sub lc { CORE::lc $_[0] }
11 sub lcfirst { CORE::lcfirst $_[0] }
12 sub uc { CORE::uc $_[0] }
13 sub ucfirst { CORE::ucfirst $_[0] }
14 sub chomp { CORE::chomp $_[0] }
15 sub chop { CORE::chop $_[0] }
16 sub reverse { CORE::reverse $_[0] }
17 sub length { CORE::length $_[0] }
18 sub lines { CORE::split '\n', $_[0] }
19 sub words { CORE::split ' ', $_[0] }
21 return CORE::index($_[0], $_[1]) if scalar @_ == 2;
22 return CORE::index($_[0], $_[1], $_[2]);
25 return CORE::rindex($_[0], $_[1]) if scalar @_ == 2;
26 return CORE::rindex($_[0], $_[1], $_[2]);
29 return CORE::split($_[1], $_[0]) if scalar @_ == 2;
30 return CORE::split($_[1], $_[0], $_[2]);
41 Moose::Autobox::String - the String role
47 "Hello World"->uc; # HELLO WORLD
51 This is a role to describes a String value.
87 All complex software has bugs lurking in it, and this module is no
88 exception. If you find a bug please either email me, or add the bug
93 Stevan Little E<lt>stevan@iinteractive.comE<gt>
95 =head1 COPYRIGHT AND LICENSE
97 Copyright 2006-2008 by Infinity Interactive, Inc.
99 L<http://www.iinteractive.com>
101 This library is free software; you can redistribute it and/or modify
102 it under the same terms as Perl itself.