|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.asterisk.util.AstUtil
public class AstUtil
Some static utility methods to handle Asterisk specific stuff.
See Asterisk's util.c.
| Method Summary | |
|---|---|
static boolean |
isTrue(java.lang.String s)
Checks if a String represents true or false
according to Asterisk's logic.The original implementation is util.c is as follows: |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isTrue(java.lang.String s)
true or false
according to Asterisk's logic.util.c is as follows:
int ast_true(const char *s)
{
if (!s || ast_strlen_zero(s))
return 0;
if (!strcasecmp(s, "yes") ||
!strcasecmp(s, "true") ||
!strcasecmp(s, "y") ||
!strcasecmp(s, "t") ||
!strcasecmp(s, "1") ||
!strcasecmp(s, "on"))
return -1;
return 0;
}
s - the String to check for true.
true if s represents true,
false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||