List Info

Thread: note 78040 added to function.str-split




note 78040 added to function.str-split
user name
2007-09-25 03:24:25
A good way to use this method to convert CamelCase text into
nice text would be-

<?php
        /**
         Returns a formatted string based on camel case.
         e.g. "CamelCase" -> "Camel
Case".
        */
        function FormatCamelCase( $string ) {
                $output = "";
                foreach( str_split( $string ) as $char ) {
                        strtoupper( $char ) == $char and
$output and $output .= " ";
                        $output .= $char;
                }
                return $output;
        }
?>
----
Server IP: 83.137.20.107
Probable Submitter: 62.58.16.165
----
Manual Page -- h
ttp://www.php.net/manual/en/function.str-split.php
Edit        -- https://master
.php.net/note/edit/78040
Del: integrated  -- h
ttps://master.php.net/note/delete/78040/integrated
Del: useless     -- http
s://master.php.net/note/delete/78040/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/78040/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/78040/spam
Del: non-english -- 
https://master.php.net/note/delete/78040/non-english
Del: in docs     -- http
s://master.php.net/note/delete/78040/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78040
Reject      -- https://mast
er.php.net/note/reject/78040
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )