def convert_starred_uri(uri):
 assert (type(uri) == six.text_type)
 cnt_stars = uri.count(u'*')
 if (cnt_stars == 0):
  match = u'exact'
 elif ((cnt_stars == 1) and (uri[(-1)] == u'*')):
  match = u'prefix'
  uri = uri[:(-1)]
 else:
  match = u'wildcard'
  uri = uri.replace(u'*', u'')
 return (uri, match)

def convert_starred_uri ( uri ) : assert ( type ( uri ) == six . text_type ) cnt_stars = uri . count ( u'*' ) if ( cnt_stars == 0 ) : match = u'exact' elif ( ( cnt_stars == 1 ) and ( uri [ ( - 1 ) ] == u'*' ) ) : match = u'prefix' uri = uri [ : ( - 1 ) ] else : match = u'wildcard' uri = uri . replace ( u'*' , u'' ) return ( uri , match )
convert a starred uri to a standard wamp uri and a detected matching policy .