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

# String - Regex & Cleaning

> Advanced string manipulation using built-in regular expressions for extracting digits, filtering words, removing whitespace, and checking content types.

<Steps titleSize="h3">
  <Step title="🗑️ Removal & Extraction">
    <ResponseField name="extractDigits()" type="String">
      Extracts all numerical digits from the string and returns them as a new string. All non-digit characters are removed.

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      final messy = 'Price: $12.99 USD';
      print(messy.extractDigits()); // "1299"
      ```
    </ResponseField>

    <ResponseField name="removeAllDigits()" type="String">
      Removes all numerical digits (`0-9`) from the string.

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      final mixed = 'Address line 123 Street 4';
      print(mixed.removeAllDigits()); // "Address line  Street "
      ```
    </ResponseField>

    <ResponseField name="removeAllWhiteSpaces()" type="String">
      Removes all whitespace characters (spaces, tabs, newlines) from the string.

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      final long = 'one two\nthree';
      print(long.removeAllWhiteSpaces()); // "onetwothree"
      ```
    </ResponseField>

    <ResponseField name="removeAllWordsStartingWithNumber()" type="String">
      Removes words that begin with a number (e.g., '3rd', '10users') and cleans up extra spaces.

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      final input = '10users 3rd place is here 54.';
      print(input.removeAllWordsStartingWithNumber()); // "place is here 54."
      ```
    </ResponseField>

    <ResponseField name="getWords()" type="String">
      Extracts all individual words from the string based on word boundaries. Useful for keyword extraction.

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      final sentence = 'The Flutter app is amazing!';
      print(sentence.getWords()); // ["The", "Flutter", "app", "is", "amazing"]
      ```
    </ResponseField>
  </Step>

  <Step title="🛡️ Validation">
    <ResponseField name="isDigitsOnly()" type="bool">
      Checks if the entire string consists only of numerical digits (`0-9`).

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      print('12345'.isDigitsOnly());   // true
      print('123 a'.isDigitsOnly());   // false
      ```
    </ResponseField>

    <ResponseField name="isTextOnly()" type="bool">
      Checks if the entire string consists only of alphabet letters (`a-z`, `A-Z`).

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      print('Flutter'.isTextOnly());    // true
      print('Flutter Dev'.isTextOnly()); // false (contains space)
      ```
    </ResponseField>
  </Step>

  <Step title="✂️ Splitting">
    <ResponseField name="splitByUpperCase()" type="List<String>">
      Splits a string into a list of substrings whenever an uppercase letter is encountered. Ideal for converting `PascalCase` to readable words.

      ```dart lines wrap theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
      final camel = 'UserProfileData';
      print(camel.splitByUpperCase()); // ["User", "Profile", "Data"]
      ```
    </ResponseField>
  </Step>
</Steps>

### 🗑️ Removal & Extraction

### 🛡️ Validation

### ✂️ Splitting
