add missing "execute" handler to phrase macro. (not yet tested)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6234 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2007-11-13 03:47:07 +00:00
parent 8ba3cbce98
commit 69f7a9a955
3 changed files with 46 additions and 0 deletions

View File

@@ -288,6 +288,36 @@ SWITCH_DECLARE(char *) switch_strip_spaces(const char *str)
return s;
}
SWITCH_DECLARE(char *) switch_separate_paren_args(char *str)
{
char *e, *args;
switch_size_t br;
if ((args = strchr(str, '('))) {
e = args - 1;
*args++ = '\0';
while(*e == ' ') {
*e-- = '\0';
}
e = args;
br = 1;
while(e && *e) {
if (*e == '(') {
br++;
} else if (br > 1 && *e == ')') {
br--;
} else if (br == 1 && *e == ')') {
*e = '\0';
break;
}
e++;
}
}
return args;
}
SWITCH_DECLARE(switch_bool_t) switch_is_number(const char *str)
{
const char *p;