+ if (! is_string($from_delim) || (! $to_null && ! is_string($to_delim))) {
+ return FALSE;
+ }
+ if (is_array($string)) {
+ // Map, Recurse
+ $count = count($string);
+ $from = one_value_array($count, $from_delim);
+ if ($to_null) {
+ // Note: array_map() vanishes all keys
+ return array_map('delimiter_reverse', $string, $from);
+ } else {
+ $to = one_value_array($count, $to_delim);
+ // Note: array_map() vanishes all keys
+ return array_map('delimiter_reverse', $string, $from, $to);
+ }
+ }
+ if (! is_string($string)) {
+ return FALSE;
+ }
+
+ // Returns com.example.bar.foo
+ if ($to_null) $to_delim = & $from_delim;