> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tinyfn.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Count Char

> Count occurrences of a character (e.g., how many 'r' in 'strawberry').



## OpenAPI

````yaml https://api.tinyfn.io/openapi.json get /v1/string/count-char
openapi: 3.1.0
info:
  title: TinyFn
  description: >-
    Enterprise-grade infrastructure for checking if 4 is even. And other
    utilities.
  version: 1.0.0
servers: []
security: []
paths:
  /v1/string/count-char:
    get:
      tags:
        - String Utilities
      summary: Count Char
      description: Count occurrences of a character (e.g., how many 'r' in 'strawberry').
      operationId: count_char_v1_string_count_char_get
      parameters:
        - name: text
          in: query
          required: true
          schema:
            type: string
            description: The text to search in
            title: Text
          description: The text to search in
        - name: char
          in: query
          required: true
          schema:
            type: string
            description: Character to count
            title: Char
          description: Character to count
        - name: case_sensitive
          in: query
          required: false
          schema:
            type: boolean
            description: Case sensitive counting
            default: true
            title: Case Sensitive
          description: Case sensitive counting
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````