parameters: (val)
return_statement: return (ret, done)
docstring: try to cast a string to an int, float or bool (in that order)
  
      Parameters:
          val: the string to cast
  
      Returns:
          (casted_val, success)
          casted val: the casted value if successful, or None
          success: bool if casting was successful
docstring_summary: try to cast a string to an int, float or bool (in that order)
docstring_tokens: try to cast a string to an int float or bool ( in that order )
function: def str_convert_single(val):
      """
      try to cast a string to an int, float or bool (in that order)
  
      Parameters:
          val: the string to cast
  
      Returns:
          (casted_val, success)
          casted val: the casted value if successful, or None
          success: bool if casting was successful
      """
      val = val.strip()
      # try int
      ret, done = str_to_type(val, int)
  
      # try float
      if not done:
          ret, done = str_to_type(val, float)
  
      # try bool
      if not done:
          ret, done = str_to_bool(val)
  
      # try None
      if not done:
          ret, done = str_to_none(val)
  
      return (ret, done)
function_tokens: def str_convert_single ( val ) : val = val . strip ( ) # try int ret , done = str_to_type ( val , int ) # try float if not done : ret , done = str_to_type ( val , float ) # try bool if not done : ret , done = str_to_bool ( val ) # try None if not done : ret , done = str_to_none ( val ) return ( ret , done )