Returns a string representation of this equation system.

@param prefix the prefix of each line
@param nf the number format
@return a string representation of this equation system
181778
public String equationsToString(String prefix, NumberFormat nf) {
    if((coeff == null) || (rhs == null) || (row == null) || (col == null)) {
      throw new NullPointerException();
    }

    int[] coeffDigits = maxIntegerDigits(coeff);
    int rhsDigits = maxIntegerDigits(rhs);

    StringBuilder buffer = new StringBuilder();
    buffer.append(prefix).append('\n').append(prefix);
    for(int i = 0; i < coeff.length; i++) {
      for(int j = 0; j < coeff[row[0]].length; j++) {
        format(nf, buffer, coeff[row[i]][col[j]], coeffDigits[col[j]]);
        buffer.append(" * x_").append(col[j]);
      }
      buffer.append(" =");
      format(nf, buffer, rhs[row[i]], rhsDigits);

      if(i < coeff.length - 1) {
        buffer.append('\n').append(prefix);
      }
      else {
        buffer.append('\n').append(prefix);
      }
    }
    return buffer.toString();
  }
126376
protected String getPrefix(String namespace, boolean generatePrefix, boolean nonEmpty) {
		// assert namespace != null;
		if (!namesInterned) {
			// when String is interned we can do much faster namespace stack
			// lookups ...
			namespace = namespace.intern();
		} else if (checkNamesInterned) {
			checkInterning(namespace);
			// assert namespace != namespace.intern();
		}
		if (namespace == null) {
			throw new IllegalArgumentException("namespace must be not null" + getLocation());
		} else if (namespace.length() == 0) {
			throw new IllegalArgumentException("default namespace cannot have prefix" + getLocation());
		}

		// first check if namespace is already in scope
		for (int i = namespaceEnd - 1; i >= 0; --i) {
			if (namespace == namespaceUri[i]) {
				final String prefix = namespacePrefix[i];
				if (nonEmpty && prefix.length() == 0)
					continue;
				// now check that prefix is still in scope
				for (int p = namespaceEnd - 1; p > i; --p) {
					if (prefix == namespacePrefix[p])
						continue; // too bad - prefix is redeclared with
									// different namespace
				}
				return prefix;
			}
		}

		// so not found it ...
		if (!generatePrefix) {
			return null;
		}
		return generatePrefix(namespace);
	}
952063
String prefix(String s) {
         return prefix(s, feedback.getPre(), feedback.getPost());
    }
335747
public String getNamespaceURIFromPrefix(String prefix)
    {
        String uri = null;
        if (m_prefixMap != null)
            uri = m_prefixMap.lookupNamespace(prefix);
        return uri;
    }
536886
static String prefix(final Fastq fastq) {
        checkNotNull(fastq);
        Matcher m = PREFIX.matcher(fastq.getDescription());
        if (!m.matches()) {
            throw new PairedEndFastqReaderException("could not parse prefix from description " + fastq.getDescription());
        }
        return m.group(1);
    }
1357011
public static String getRandomFilename(final String prefix) {

		final StringBuilder stringBuilder = new StringBuilder(prefix);

		for (int i = 0; i < LENGTH; i++) {
			stringBuilder.append(ALPHABET[(int) Math.floor(Math.random() * (double) ALPHABET.length)]);
		}

		return stringBuilder.toString();
	}
382834
public static String stringFor(int n)
    {
        switch (n)
        {
            case CU_GRAPH_NODE_TYPE_KERNEL: return "CU_GRAPH_NODE_TYPE_KERNEL";
            case CU_GRAPH_NODE_TYPE_MEMCPY: return "CU_GRAPH_NODE_TYPE_MEMCPY";
            case CU_GRAPH_NODE_TYPE_MEMSET: return "CU_GRAPH_NODE_TYPE_MEMSET";
            case CU_GRAPH_NODE_TYPE_HOST: return "CU_GRAPH_NODE_TYPE_HOST";
            case CU_GRAPH_NODE_TYPE_GRAPH: return "CU_GRAPH_NODE_TYPE_GRAPH";
            case CU_GRAPH_NODE_TYPE_EMPTY: return "CU_GRAPH_NODE_TYPE_EMPTY";
        }
        return "INVALID CUgraphNodeType: "+n;
    }
584373
@Nonnull
    public static String getNCNamePrefix(CharSequence s) {
        if (s.length() > 1 && s.charAt(0) == '_' && s.charAt(1) == ':') {
            return s.toString();
        }
        int localPartStartIndex = getNCNameSuffixIndex(s);
        if (localPartStartIndex > -1) {
            return s.toString().substring(0, localPartStartIndex);
        } else {
            return s.toString();
        }
    }
642101
public String getNamespaceURI(String prefix) {
		List<NamespaceDeclaration> nsDecls = getNamespaceDeclarations();
		for (int i = 0; i < nsDecls.size(); i++) {
			NamespaceDeclaration nsDecl = nsDecls.get(i);
			if (nsDecl.prefix.equals(prefix)) {
				return nsDecl.namespaceURI;
			}
		}
		return null;
	}
366605
public String createNewVariableOnSolver(final String prefix) {
        final int index = this.name2idx.size() + 1;
        final String varName = prefix + "_" + index;
        this.name2idx.put(varName, index);
        this.idx2name.put(index, varName);
        return varName;
    }
296900
public static String stringFor(int n)
    {
        switch (n)
        {
            case CURAND_STATUS_SUCCESS: return "CURAND_STATUS_SUCCESS";
            case CURAND_STATUS_VERSION_MISMATCH: return "CURAND_STATUS_VERSION_MISMATCH";
            case CURAND_STATUS_NOT_INITIALIZED: return "CURAND_STATUS_NOT_INITIALIZED";
            case CURAND_STATUS_ALLOCATION_FAILED: return "CURAND_STATUS_ALLOCATION_FAILED";
            case CURAND_STATUS_TYPE_ERROR: return "CURAND_STATUS_TYPE_ERROR";
            case CURAND_STATUS_OUT_OF_RANGE: return "CURAND_STATUS_OUT_OF_RANGE";
            case CURAND_STATUS_LENGTH_NOT_MULTIPLE: return "CURAND_STATUS_LENGTH_NOT_MULTIPLE";
            case CURAND_STATUS_DOUBLE_PRECISION_REQUIRED: return "CURAND_STATUS_DOUBLE_PRECISION_REQUIRED";
            case CURAND_STATUS_LAUNCH_FAILURE: return "CURAND_STATUS_LAUNCH_FAILURE";
            case CURAND_STATUS_PREEXISTING_FAILURE: return "CURAND_STATUS_PREEXISTING_FAILURE";
            case CURAND_STATUS_INITIALIZATION_FAILED: return "CURAND_STATUS_INITIALIZATION_FAILED";
            case CURAND_STATUS_ARCH_MISMATCH: return "CURAND_STATUS_ARCH_MISMATCH";
            case CURAND_STATUS_INTERNAL_ERROR: return "CURAND_STATUS_INTERNAL_ERROR";
        }
        return "INVALID curandStatus";
    }
462478
def strnum(prefix: str, num: int, suffix: str = "") -> str:
    
    return "{}{}{}".format(prefix, num, suffix)
1158838
public static String string(double n) {
        if (Double.isInfinite(n)) {
            return (n > 0) ? "+inf" : "-inf";
        }
        return Double.toString(n);
    }
184764
public static String stringFor(int n)
    {
        switch (n)
        {
            case CU_TARGET_COMPUTE_10: return "CU_TARGET_COMPUTE_10";
            case CU_TARGET_COMPUTE_11: return "CU_TARGET_COMPUTE_11";
            case CU_TARGET_COMPUTE_12: return "CU_TARGET_COMPUTE_12";
            case CU_TARGET_COMPUTE_13: return "CU_TARGET_COMPUTE_13";
            case CU_TARGET_COMPUTE_20: return "CU_TARGET_COMPUTE_20";
            case CU_TARGET_COMPUTE_21: return "CU_TARGET_COMPUTE_21";
            case CU_TARGET_COMPUTE_30: return "CU_TARGET_COMPUTE_30";
            case CU_TARGET_COMPUTE_32: return "CU_TARGET_COMPUTE_32";
            case CU_TARGET_COMPUTE_35: return "CU_TARGET_COMPUTE_35";
            case CU_TARGET_COMPUTE_37: return "CU_TARGET_COMPUTE_37";
            case CU_TARGET_COMPUTE_50: return "CU_TARGET_COMPUTE_50";
            case CU_TARGET_COMPUTE_52: return "CU_TARGET_COMPUTE_52";
            case CU_TARGET_COMPUTE_53: return "CU_TARGET_COMPUTE_53";
            case CU_TARGET_COMPUTE_60: return "CU_TARGET_COMPUTE_60";
            case CU_TARGET_COMPUTE_61: return "CU_TARGET_COMPUTE_61";
            case CU_TARGET_COMPUTE_62: return "CU_TARGET_COMPUTE_62";
            case CU_TARGET_COMPUTE_70: return "CU_TARGET_COMPUTE_70";
            case CU_TARGET_COMPUTE_73: return "CU_TARGET_COMPUTE_73";
            case CU_TARGET_COMPUTE_75: return "CU_TARGET_COMPUTE_75";
        }
        return "INVALID CUjit_target: "+n;
    }
68245
public static List<String> getKeys(String prefix) {
        List<String> res = new ArrayList<>();
        for(String key: props.keySet()){
            if(key.startsWith(prefix)){
                res.add(key);
            }
        }
        return res;
    }
891723
@Pure
	protected String lines(String prefix, String... lines) {
		final String delimiter = getCodeConfig().getLineDelimiter();
		final StringBuilder buffer = new StringBuilder();
		for (final String line : lines) {
			buffer.append(prefix);
			buffer.append(line);
			buffer.append(delimiter);
		}
		return buffer.toString();
	}
242595
public long getRequstURIPath(String prefix, long defvalue) {
        String val = getRequstURIPath(prefix, null);
        try {
            return val == null ? defvalue : Long.parseLong(val);
        } catch (NumberFormatException e) {
            return defvalue;
        }
    }