chickadee » srfi-13 » check-substring-spec

check-substring-spec proc s start endprocedure
substring-spec-ok? s start endprocedure

Check values S, START and END to ensure they specify a valid substring. This means that S is a string, START and END are exact integers, and 0 <= START <= END <= (string-length S)

If the values are not proper

  • check-substring-spec raises an error condition. PROC is used as part of the error condition, and should be the procedure whose parameters we are checking.
  • substring-spec-ok? returns false.

Otherwise, substring-spec-ok? returns true, and check-substring-spec simply returns (what it returns is not specified).