parameters: (d, idx)
return_statement: return s2k, idx + s2k.size
docstring: Return a S2K instance and an incremented index.
  
      :Parameters:
          - `d`: string of data starting with the first octet of the
            string-to-key specifier
          - `idx`: integer position in external data string
  
      :Returns: tuple (S2K_instance, new_index) (see `S2K tuple`_)
  
      .. _S2K tuple:
  
      S2K tuple:
  
          - `S2K_instance`: S2K instance created using string `d`
          - `new_index`: integer original `idx` parameter
            incremented by the octet length of the S2K instance
  
      To eliminate look-ahead code when parsing string-to-key data,
      this function automates the creation of the S2K instance and
      the incrementing of the index position in the data string `d`.
  
      :Note: `MPI` instances work the same way. `strcalc_s2k()`
          basically saves "look ahead" code from showing up wherever `S2K`
          instances are looked for. It might feel safer to do the look
          aheads rather than trust this code with the whole of the data
          used to build the S2K instance, but boy would it make the calling
          code look ugly.
docstring_summary: Return a S2K instance and an incremented index.
docstring_tokens: Return a S2K instance and an incremented index .
function: def strcalc_s2k(d, idx):
      """Return a S2K instance and an incremented index.
  
      :Parameters:
          - `d`: string of data starting with the first octet of the
            string-to-key specifier
          - `idx`: integer position in external data string
  
      :Returns: tuple (S2K_instance, new_index) (see `S2K tuple`_)
  
      .. _S2K tuple:
  
      S2K tuple:
  
          - `S2K_instance`: S2K instance created using string `d`
          - `new_index`: integer original `idx` parameter
            incremented by the octet length of the S2K instance
  
      To eliminate look-ahead code when parsing string-to-key data,
      this function automates the creation of the S2K instance and
      the incrementing of the index position in the data string `d`.
  
      :Note: `MPI` instances work the same way. `strcalc_s2k()`
          basically saves "look ahead" code from showing up wherever `S2K`
          instances are looked for. It might feel safer to do the look
          aheads rather than trust this code with the whole of the data
          used to build the S2K instance, but boy would it make the calling
          code look ugly.
      """
      s2k = S2K(d)
      return s2k, idx + s2k.size
function_tokens: def strcalc_s2k ( d , idx ) : s2k = S2K ( d ) return s2k , idx + s2k . size