Skip to content

add totext method that can fetch the content directly #98

@cxx199921110

Description

@cxx199921110

i use below method currently to fetch the node content:

==================
private String toText(String content, TSNode node) {
byte[] bytes = content.getBytes(StandardCharsets.UTF_8);
int startByte = node.getStartByte();
int endByte = node.getEndByte();
byte[] nodeBytes = Arrays.copyOfRange(bytes, startByte, endByte);
return new String(nodeBytes, StandardCharsets.UTF_8);
}

hope to add add totext method like python that can fetch the content directly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions