def isLDAPUrl(s):
 s_lower = s.lower()
 return (s_lower.startswith('ldap://') or s_lower.startswith('ldaps://') or s_lower.startswith('ldapi://'))

def isLDAPUrl ( s ) : s_lower = s . lower ( ) return ( s_lower . startswith ( 'ldap://' ) or s_lower . startswith ( 'ldaps://' ) or s_lower . startswith ( 'ldapi://' ) )
returns 1 if s is a ldap url .