Create clear, comprehensive, and properly structured code samples to document API usage. Follow these principles:

  1. Organize samples properly:
  2. Create focused examples:

    @Sample fun substringWithRange() { // Overload with range val str = “abcde” assertPrints(str.substring(0, 3), “abc”) assertPrints(str.substring(0, 0), “”) } ```

  3. Include comprehensive examples:
  4. Use standard formatting:
  5. Ensure samples are properly referenced: