Ordinal Suffix Management
The ordinal suffix utilities help you add or remove Persian ordinal suffixes (ام، م، ین) from numbers to create ordinal numbers like “اول”، “دوم”، “سوم”.Available Functions
Add Ordinal
addOrdinalSuffix() - Add ordinal suffixesRemove Ordinal
removeOrdinalSuffix() - Remove ordinal suffixesBasic Usage
Adding Ordinal Suffixes
Convert cardinal numbers to ordinal numbers in Persian:Numbers with Complex Forms
Compound Numbers
Removing Ordinal Suffixes
Convert ordinal numbers back to cardinal numbers:Complex Ordinals
Special Cases and Rules
Irregular Forms
Half-Space Handling
Advanced Examples
Date Processing
List Generation
Text Processing
Edge Cases
Invalid Input
Already Processed
Complete Ordinal Reference
- 1-20
- Tens
- Hundreds & Thousands
| Cardinal | Ordinal |
|---|---|
| یک | اول |
| دو | دوم |
| سه | سوم |
| چهار | چهارم |
| پنج | پنجم |
| شش | ششم |
| هفت | هفتم |
| هشت | هشتم |
| نه | نهم |
| ده | دهم |
| یازده | یازدهم |
| دوازده | دوازدهم |
| سیزده | سیزدهم |
| چهارده | چهاردهم |
| پانزده | پانزدهم |
| شانزده | شانزدهم |
| هفده | هفدهم |
| هجده | هجدهم |
| نوزده | نوزدهم |
| بیست | بیستم |
TypeScript Support
Performance Considerations
🚀 Performance Metrics
🚀 Performance Metrics
- Simple words: ~0.1ms
- Compound numbers: ~0.2ms
- Batch processing: Linear scaling
- Memory usage: Minimal overhead
📦 Optimization Tips
📦 Optimization Tips
- Cache results for frequently used numbers
- Process in batches for large datasets
- Use with number-to-words for complete pipeline
