Java String Audit for PTC-Lisp

Copy Markdown View Source

Warning: This file is auto-generated by mix ptc.gen_docs from priv/java_compat_audit.exs. Manual edits will be overwritten. Edit priv/java_compat_audit.exs instead.

Curated LLM-compatibility target for java.lang.String methods.

See also: Function Reference | Namespace Coverage | Clojure Core Audit | Clojure String Audit | Clojure Set Audit | Clojure Walk Audit | Java Math Audit | Java Boolean Audit | Java Double Audit | Java Float Audit | Java Integer Audit | Java Long Audit | Java System Audit | Java LocalDate Audit | Java Instant Audit | Java Duration Audit | Java Period Audit | Java Date Audit

Summary

Coverage excludes not_relevant entries: supported / (supported + candidate + not_classified).

StatusCount
Supported9
Candidate4
Not Relevant2
Not Classified0
Relevant Target13
Coverage9/13 (69.2%)
Total15

Details

VarStatusDescriptionNotes
.charAt🔲 candidateReturn character at indexPotentially useful, but PTC-Lisp must define grapheme semantics.
.contains✅ supportedSubstring containmentDIV-40: character literals are accepted as arguments (PTC-Lisp has no Character type). DIV-41: character-literal receivers behave as one-character strings
.endsWith✅ supportedSuffix testDIV-40: character literals are accepted as arguments (PTC-Lisp has no Character type). DIV-41: character-literal receivers behave as one-character strings
.equalsIgnoreCase🔲 candidateCase-insensitive string equalityCommon Java idiom in generated code.
.getBytes❌ not_relevantEncode string to bytesByte arrays and charsets are outside the sandbox data model.
.indexOf✅ supportedFirst substring indexBUG GAP-J05: integer character-code overloads are unsupported. BUG GAP-J09: non-BMP offsets are grapheme-based instead of Java UTF-16 code-unit based. DIV-41: character-literal receivers behave as one-character strings (PTC-Lisp has no Character type)
.intern❌ not_relevantIntern a Java stringJVM string pool operation; not meaningful on BEAM.
.isEmpty🔲 candidateReturn true for empty stringempty? covers the common PTC-Lisp need.
.lastIndexOf✅ supportedLast substring indexBUG GAP-J05: substring/from-index and integer character-code overloads are unsupported. BUG GAP-J09: non-BMP offsets are grapheme-based instead of Java UTF-16 code-unit based. DIV-41: character-literal receivers behave as one-character strings (PTC-Lisp has no Character type)
.length✅ supportedString lengthBUG GAP-J09: non-BMP length is grapheme-based instead of Java UTF-16 code-unit based. DIV-41: character-literal receivers behave as one-character strings (PTC-Lisp has no Character type)
.startsWith✅ supportedPrefix testBUG GAP-J05: prefix/offset overload is unsupported. DIV-40: character literals are accepted as arguments (PTC-Lisp has no Character type). DIV-41: character-literal receivers behave as one-character strings
.substring✅ supportedExtract substringBUG GAP-J09: non-BMP indexes are grapheme-based instead of Java UTF-16 code-unit based. DIV-41: character-literal receivers behave as one-character strings (PTC-Lisp has no Character type)
.toLowerCase✅ supportedLowercase stringDIV-41: character-literal receivers behave as one-character strings (PTC-Lisp has no Character type)
.toUpperCase✅ supportedUppercase stringDIV-41: character-literal receivers behave as one-character strings (PTC-Lisp has no Character type)
.trim🔲 candidateTrim leading and trailing whitespaceCommon LLM spelling; clojure.string/trim is not currently implemented.