# Copyright (c) 2004-2006 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: String.bunit,v 1.14 2011/12/06 02:55:18 nagler Exp $ Type(); [ compare => [ [undef, undef] => 0, [undef, ''] => 0, ['', undef] => 0, ['', 'x'] => -1, ['x', ''] => 1, ], from_literal => [ '' => UNDEF(), 'x' => 'x', ], from_literal_or_die => [ '' => DIE(), ['', 1] => [undef], ], to_camel_case => [ '' => '', [undef] => [undef], 0 => '0', 'a-z' => 'A Z', 'ab cd' => 'Ab Cd', 'ab_c.d 9' => 'Ab C D 9', ], to_camel_case_identifier => [ 0 => '0', 'a-z' => 'AZ', 'ab cd' => 'AbCd', ], canonicalize_charset => [ "\x{200b}" => '', "\x{2bc}" => "'", "\x{2018}hello\x{2018}" => "'hello'", "\xe2\x80\x98hello\xe2\x80\x99" => "'hello'", "\x00C6" => 'AE', "'x" => "'x", "\223smart quotes\224" => '"smart quotes"', "\221single quotes\222" => "'single quotes'", "\n\r\t" => '', "a\n\r\tb" => "a\n\n b", "a\n\n\nb" => "a\n\n\nb", 'รก' => 'a', "\xe2\x80\xb3" => '"', ], canonicalize_and_excerpt => [ [undef] => [\('')], '' => [\('')], "\221a short text." => [\(q{'a short text.})], join(' ', 1 .. 50) => [\(join(' ', 1 .. 45) . ' ...')], [join(' ', 1 .. 10), 5, 1], => [\(join(' ', 1 .. 5))], ], ];