Skip to content

Potentially remove stripQuotes which remove leading and trailing matched quotes in an string, at least in attribute values #7

@coderextreme

Description

@coderextreme

X3DJSONLD.java:

public String stripQuotes(String value) {
                if (value.charAt(0) == '"' && value.charAt(value.length()-1) == '"') {
                        return value.substring(1, value.length()-1);
                } else {
                        return value;
                }
        }

X3DJSONLD.cpp

const XMLCh * X3DJSONLD::stripQuotes(const XMLCh * value) {
        if (value[0] == '"' && value[XMLString::stringLen(value)-1] == '"') {
                XMLCh * tempStr = new XMLCh[XMLString::stringLen(value)-1];
                // TODO check bool
                XMLString::copyNString(tempStr, value, XMLString::stringLen(value)-2);
                cerr << "Strip quotes " << StrX(tempStr) << endl;
                return tempStr;    
        } else {
                cerr << "No strip quotes " <<  StrX(value) << endl;
                return value;
        }
}

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