Produces a string to represent the segment, favouring wildcards and range characters over the network prefix to represent subnets.
If it exists, the segment CIDR prefix is ignored and the explicit range is printed.
@return
321229
@Override
	public String getWildcardString() {
		String result = cachedWildcardString;
		if(result == null) {
			synchronized(this) {
				result = cachedWildcardString;
				if(result == null) {
					if(!isPrefixed() || !isMultiple()) {
						result = getString();
					} else if(!isFullRange() || (result = getDefaultSegmentWildcardString()) == null) {
						result = getDefaultRangeString();
					}
					cachedWildcardString = result;
				}
			}
		}
		return result;
	}
356381
private static CharSequence convertReverseDNSIPv4(String str, int suffixStartIndex) throws AddressStringException {
		StringBuilder builder = new StringBuilder(suffixStartIndex);
		int segCount = 0;
		int j = suffixStartIndex;
		for(int i = suffixStartIndex - 1; i > 0; i--) {
			char c1 = str.charAt(i);
			if(c1 == IPv4Address.SEGMENT_SEPARATOR) {
				if(j - i <= 1) {
					throw new AddressStringException(str, i);
				}
				for(int k = i + 1; k < j; k++) {
					builder.append(str.charAt(k));
				}
				builder.append(c1);
				j = i;
				segCount++;
			}
		}
		for(int k = 0; k < j; k++) {
			builder.append(str.charAt(k));
		}
		if(segCount + 1 != IPv4Address.SEGMENT_COUNT) {
			throw new AddressStringException(str, 0);
		}
		return builder;
	}
428091
public static String getOutputPart(ProcessOutput processOutput,String prefix)
    {
        //get output
        String output=processOutput.getOutputText();

        if(output!=null)
        {
            //set flag
            boolean validOutput=false;

            int index=output.indexOf(prefix);
            if(index!=-1)
            {
                //get index
                index=index+prefix.length();
    
                if(output.length()>index)
                {
                    //get output
                    output=output.substring(index);
                    
                    output=output.trim();
                    index=output.indexOf("\n");
                    if(index!=-1)
                    {
                        output=output.substring(0,index);
                        output=output.trim();
                    }

                    if(output.length()>0)
                    {
                        //set flag
                        validOutput=true;
                    }
                }
            }
            
            if(!validOutput)
            {
                output=null;
            }
        }
        
        return output;
    }
598714
public String toMutilLineString() {
		final String newLine = System.getProperty("line.separator");
		final StringBuffer problemStr = new StringBuffer();
		for (final Problem problem : this.problems) {
			problemStr.append(problem.getMessage() + newLine);
		}
		return problemStr.toString();
	}
1262269
public String getOriginalString() {

    if (this.string != null) {
      this.string = new String(this.buffer, this.initialOffset, getLength());
    }
    return this.string;
  }
1221902
@Override
	public String getString() {
		String result = cachedString;
		if(result == null) {
			synchronized(this) {
				result = cachedString;
				if(result == null) {
					if(isSinglePrefixBlock() || !isMultiple()) { //covers the case of !isMultiple, ie single addresses, when there is no prefix or the prefix is the bit count
						result = getDefaultLowerString();
					} else if(!isFullRange() || (result = getDefaultSegmentWildcardString()) == null) {
						if(isPrefixBlock()) {
							result = getDefaultMaskedRangeString();
						} else {
							result = getDefaultRangeString();
						}
					}
					cachedString = result;
				}
			}
		}
		return result;
	}
1126782
public String getString()
    {
        StringBuffer    buf = new StringBuffer();

        for (int i = 0; i != string.length; i++)
        {
            buf.append(table[(string[i] >>> 4) % 0xf]);
            buf.append(table[string[i] & 0xf]);
        }

        return buf.toString();
    }
872776
protected String getMappingString() {
        StringBuilder sb = new StringBuilder();
        final int schemaSize = uriMap.size();
        final int domainSize = patternMap.size();
        int s = 0, d = 0;
        for (String schema: uriMap.keySet()) {
            if (s > 0) sb.append(", ");
            sb.append(schema);
            s++;
            if (s > 2 && schemaSize > 3) {
                sb.append(", ");
                sb.append(schemaSize - s);
                sb.append(" more");
                break;
            }
        }
        if (schemaSize > 0 && domainSize > 0) sb.append("; ");
        for (Pattern domain: patternMap.keySet()) {
            if (d > 0) sb.append(", ");
            sb.append(domain.pattern());
            d++;
            if (d > 2 && domainSize > 3) {
                sb.append(", ");
                sb.append(domainSize - s);
                sb.append(" more");
                break;
            }
        }
        return sb.toString();
    }
584258
public String toStringAST() {

        StringBuilder builder = new StringBuilder();

        walk(root, builder);

        return builder.toString();
    }
642471
public char getSegmentStandin(int seg) {
        if (segmentStandins.length() < seg) {
            segmentStandins.setLength(seg);
        }
        char c = segmentStandins.charAt(seg-1);
        if (c == 0) {
            if (variableNext >= variableLimit) {
                throw new RuntimeException("Variable range exhausted");
            }
            c = variableNext++;
            // Set a placeholder in the master variables vector that will be
            // filled in later by setSegmentObject().  We know that we will get
            // called first because setSegmentObject() will call us.
            variablesVector.add(null);
            segmentStandins.setCharAt(seg-1, c);
        }
        return c;
    }
1315252
public function toString()
    {
        $newLine = "\n";
        $string = $newLine . $newLine;

        $i = 0;
        foreach ($this->dns as $dns) {
            ++$i;
            $string .= 'DNS.' . $i . ' = ' . $dns .$newLine;
        }

        $i = 0;
        foreach ($this->ip as $ip) {
            ++$i;
            $string .= 'IP.' . $i . ' = ' . $ip .$newLine;
        }

        $i = 0;
        foreach ($this->url as $url) {
            ++$i;
            $string .= 'URL.' . $i . ' = ' . $url .$newLine;
        }

        return $string;
    }
493144
public String toUrl() {
		StringBuffer buffer = new StringBuffer(DEFAULT_BUFFER_SIZE);

		for (int i = names.size() - 1; i >= 0; i--) {
			LdapRdn n = (LdapRdn) names.get(i);
			buffer.append(n.encodeUrl());
			if (i > 0) {
				buffer.append(",");
			}
		}
		return buffer.toString();
	}
677986
public String toQueryString() {

        String result = null;

        List<String> parameters = new ArrayList<>();
        for (Map.Entry<String, String> entry : entrySet()) {
            // We don't encode the key because it could legitimately contain
            // things like underscores, e.g. "_escaped_fragment_" would become:
            // "%5Fescaped%5Ffragment%5F"
            String key = entry.getKey();
            String value;
            try {
                value = URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8.name());
            } catch (UnsupportedEncodingException e) {
                throw new IllegalArgumentException("Error encoding URL", e);
            }
            // Jetty class *appears* to need Java 8
            //String value = UrlEncoded.encodeString(entry.getValue());
            parameters.add(key + "=" + value);
        }
        if (parameters.size() > 0) {
            result = StringUtils.join(parameters, '&');
        }

        return result;
    }
696311
public String toStateString() {
        StringBuffer buff = new StringBuffer();
        buff.append("Host: ");
        buff.append(this.hostname);
        buff.append(':');
        buff.append(this.port);
        buff.append("\n");
        return buff.toString();
    }
1343340
public static String driversLicense() {
        StringBuffer dl = new StringBuffer(JDefaultAddress.stateAbbr());
        dl.append("-");
        dl.append(JDefaultNumber.randomNumberString(8));

        return dl.toString();
    }
1343852
public String nextString() {
        nextClean('"');
        StringBuilder sb = new StringBuilder();
        for (;;) {
            char c = next();
            switch (c) {
                case 0:
                case '\n':
                case '\r':
                    throw syntaxError("Unterminated string");
                case '\\':
                    c = next();
                    switch (c) {
                        case 'b':
                            sb.append('\b');
                            break;
                        case 't':
                            sb.append('\t');
                            break;
                        case 'n':
                            sb.append('\n');
                            break;
                        case 'f':
                            sb.append('\f');
                            break;
                        case 'r':
                            sb.append('\r');
                            break;
                        case 'u':
                            sb.append((char)Integer.parseInt(next(4), 16));
                            break;
                        default:
                            sb.append(c);
                    }
                    break;
                case '"':
                    return sb.toString();
                default:
                    if (c < ' ') {
                        throw syntaxError("Unescaped control character (ascii " + ((int) c) + ") in string");
                    }
                    sb.append(c);
                    break;
            }
        }
    }
1271794
public String getNormalisedPrefix() {
        StringBuilder strBuilder = new StringBuilder();
        strBuilder.append(scheme).append("://").append(host);
        if (!isDefaultHttpOrHttpsPort(scheme, port)) {
            strBuilder.append(':').append(port);
        }
        if (path != null) {
            strBuilder.append(path);
        }
        return strBuilder.toString();
    }