public static String putParseableWaypointsInText(final String text, final Collection<Waypoint> waypoints, final VariableList vars) {
        String cleanText = removeParseableWaypointsFromText(text);
        if (!cleanText.isEmpty()) {
            cleanText = cleanText + "\n\n";
        }

        final String newWaypoints = getParseableText(waypoints, vars, true);
        return cleanText + newWaypoints;
    }
Replaces waypoints stored in text with the ones passed as parameter.

@param text      text to search and replace waypoints in
@param waypoints new waypoints to store
@return new text, or null if waypoints could not be placed due to size restrictions
main/src/main/java/cgeo/geocaching/models/CacheArtefactParser.java