Duplicates text strings a specified number of times with precise control. Access via MCP in Cursor or Windsurf, or call GET /v1/string/repeat with text and count parameters. Perfect for generating test data, creating separators, or building repeated patterns. Returns exact concatenation without separators unless specified.
curl "https://tinyfn.io/v1/string/repeat" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/string/repeat', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/string/repeat',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's string tools:
{
"mcpServers": {
"tinyfn-string": {
"url": "https://tinyfn.io/mcp/string",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Send GET request to /v1/string/repeat with 'text' and 'count' parameters, or use the MCP tool in your AI editor. Returns the text concatenated the specified number of times.
Yes, most implementations allow a separator parameter. Without it, text concatenates directly (e.g., 'hi' × 3 = 'hihihi').
Zero returns an empty string. Negative values typically return empty string or error, depending on implementation validation.
MCP gives AI agents deterministic string repetition without generating code. Faster for simple cases, while loops offer more complex pattern control.
Limits vary by implementation to prevent memory issues. Typically several thousand repetitions for reasonable text lengths are supported.