code: def blocknum(ch):
      """Returns the unicode block number for ch, or None if ch has no block.
  
      >>> blocknum(u'a')
      0
      >>> blocknum(unichr(0x0b80))
      22
      >>> blocknum(unichr(2048))
      None
      """
  
      cp = ord(ch)
      i = bisect_right(_starts, cp) - 1
      end = _ends[i]
      if cp > end:
          return None
      return i
  
file_path: whoosh/src/whoosh/support/unicode.py
imports: import re
  from bisect import bisect_right
  from whoosh.compat import text_type, u
label_desc: Use image node_id 3 for calling a global function with example usage: blocknum(ch) and returns: i, None