Skip to main content
Glama
test_count.py407 B
from mcp_charcount.server import count_chars def test_chars_including_whitespace(): assert count_chars("a b\t", mode="chars", include_whitespace=True)["count"] == 4 def test_chars_excluding_whitespace(): assert count_chars("a b\t", mode="chars", include_whitespace=False)["count"] == 2 def test_bytes_utf8(): assert count_chars("あ", mode="bytes")["count"] == len("あ".encode("utf-8"))

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TORIFUKUKaiou/mcp-charcount'

If you have feedback or need assistance with the MCP directory API, please join our Discord server