PHP » PYTHON |
login |
register |
about
|
PYTHON is_string
is this article helpful?
|
Python replacement for PHP's is_string
[
edit
| history
]
isinstance(obj, str) If the presence of unicode strings is not a problem, you should consider this: isinstance(obj, basestring) is_string(PHP 4, PHP 5) is_string — Find whether the type of a variable is string Parameters
Return ValuesReturns TRUE if var is of type string, FALSE otherwise. Examples
Example #1 is_string() example
<?phpThe above example will output: is string bool(true) bool(true) bool(false) bool(false)
See Also
|
more
Recently updated
more
Most requested
|