@@ 532-538 (lines=7) @@ | ||
529 | $s = ''; |
|
530 | if (empty($ar)) |
|
531 | $s = $str; |
|
532 | else |
|
533 | { |
|
534 | foreach ($ar as $s1) |
|
535 | if (!empty($s1)) |
|
536 | $s .= '_' . strtolower($s1); |
|
537 | $s = substr($s, 1); |
|
538 | } |
|
539 | return $s; |
|
540 | } // end of func StrUcfirst2Underline |
|
541 | ||
@@ 559-565 (lines=7) @@ | ||
556 | $str = str_replace('-', '_', $str); |
|
557 | $ar = explode('_', $str); |
|
558 | $s = ''; |
|
559 | if (empty($ar)) |
|
560 | $s = ucfirst($str); |
|
561 | else |
|
562 | foreach ($ar as $s1) { |
|
563 | if ('' != $s1) |
|
564 | $s .= ucfirst($s1); |
|
565 | } |
|
566 | return $s; |
|
567 | } // end of func StrUnderline2Ucfirst |
|
568 |