{"id":"text-count","version":"1.0.0","description":"Count Unicode code points, UTF-16 code units, UTF-8 bytes, and lines.","supported_operations":["text count","count code points","utf8 byte length","count lines"],"unsupported_operations":["grapheme clusters","locale","word count","column width"],"semantics":["code_points: number of Unicode code points via for-of over the string (unpaired surrogates count as one each).","utf16_code_units: text.length.","utf8_bytes: Buffer.byteLength(text, \"utf8\").","Split on CR LF, LF, or CR. Do not treat other Unicode separators as line breaks.","A trailing terminator does not create an extra empty line.","Empty document -> zero lines, trailing_terminator false.","A document that is only a terminator -> one empty line, trailing_terminator true.","A document with no terminator -> last line kept, trailing_terminator false.","Preserve empty lines in the middle.","No locale, no NFC/NFD, no grapheme segmentation."],"limits":{"max_input_bytes":256000,"max_lines":10000},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string","maxLength":256000}}},"output_schema":{"type":"object","additionalProperties":false,"required":["code_points","utf16_code_units","utf8_bytes","lines","trailing_terminator"],"properties":{"code_points":{"type":"integer"},"utf16_code_units":{"type":"integer"},"utf8_bytes":{"type":"integer"},"lines":{"type":"integer"},"trailing_terminator":{"type":"boolean"}}},"examples":[{"input":{"text":"שלום\n"},"output":{"code_points":5,"utf16_code_units":5,"utf8_bytes":9,"lines":1,"trailing_terminator":true}}],"execute_url":"/v1/tools/text-count/versions/1.0.0/execute"}