Returns string of specified length filled with specified symbol

@param symbol character with which String would be filled
@param times  amount of times character would be copied
@return filled String
347126
private String fill(char symbol, int times) {
        char[] result = new char[times];


        for (int i = 0; i < times; i++) {
            result[i] = symbol;
        }

        return new String(result);
    }
340587
def from_symbol(cls, symbol: str) -> "Piece":
        
        return cls(PIECE_SYMBOLS.index(symbol.lower()), symbol.isupper())
943682
@Override
  public int get(String symbol) {
    int id = symbolToId.getOrDefault(symbol, -1);
    if (id < 0) {
      throw new IllegalArgumentException("No symbol exists for key " + symbol);
    }
    return id;
  }
1228683
function(strings) {
			var lengths = strings.map(function(s) {
				return typeof s === 'string' ? s.length : +s;
			});
			
			var max = lengths.reduce(function(prev, cur) {
				return typeof prev === 'undefined' ? cur : Math.max(prev, cur);
			});
			return lengths.map(function(l) {
				var pad = max - l;
				return pad ? this.repeatString(' ', pad) : '';
			}, this);
		}
425047
public static String getDescription(String symbol)
    {
        CharInfo info = (CharInfo) fSymbolMap.get(symbol);
        return (info != null) ? info.fDescription : null;
    }
1352541
public static String getStringFromTokens(final String[] tokens) {
    final StringBuilder sb = new StringBuilder();
    for (final String tok : tokens) {
      sb.append(tok).append(" ");
    }
    return sb.toString().trim();
  }
816741
def get_symbol(units) -> str:
    
    if kind(units) == "energy":
        d = {}
        d["nm"] = r"\lambda"
        d["wn"] = r"\bar\nu"
        d["eV"] = r"\hslash\omega"
        d["Hz"] = r"f"
        d["THz"] = r"f"
        d["GHz"] = r"f"
        return d.get(units, "E")
    elif kind(units) == "delay":
        return r"\tau"
    elif kind(units) == "fluence":
        return r"\mathcal{F}"
    elif kind(units) == "pulse_width":
        return r"\sigma"
    elif kind(units) == "temperature":
        return r"T"
    else:
        return kind(units)
1177862
public String readStringFix(final int length) {
        byte[] result = new byte[length];
        byteBuf.readBytes(result);
        return new String(result);
    }
863716
public static String randomAsciiFixLength(int length) {
		return RandomStringUtils.random(length, 32, 127, false, false, null, threadLocalRandom());
	}
1070356
public void expandSymbol(int symbol) {
        int prod, maxProd;
        int ofs, maxOfs;
        int ofs2, maxOfs2;
        int i, j;
        boolean found;
        int count, nextCount;
        IntArrayList next;
        int[][] expand;
        List<int[]> expandLst;
        int right;

        maxProd = getProductionCount();

        // make an array of the expand prods to easily index them;
        // storing the indexes instead is difficult because the indexes
        // max change
        expandLst = new ArrayList<int[]>();
        for (prod = 0; prod < maxProd; prod++) {
            if (getLeft(prod) == symbol) {
                expandLst.add(getProduction(prod));
            }
        }
        expand = new int[expandLst.size()][];
        expandLst.toArray(expand);

        for (prod = maxProd - 1; prod >= 0; prod--) {
            maxOfs = getLength(prod);
            found = false;
            nextCount = 1;
            for (ofs = 0; ofs < maxOfs; ofs++) {
                if (getRight(prod, ofs) == symbol) {
                    found = true;
                    nextCount *= expand.length;
                }
            }
            if (found) {
                // testing found is an optimization
                for (i = 0; i < nextCount; i++) {
                    count = i;
                    next = new IntArrayList();
                    next.add(getLeft(prod));
                    for (ofs = 0; ofs < maxOfs; ofs++) {
                        right = getRight(prod, ofs);
                        if (right == symbol) {
                            j = count % expand.length;
                            maxOfs2 = expand[j].length;
                            for (ofs2 = 1; ofs2 < maxOfs2; ofs2++) {
                                next.add(expand[j][ofs2]);
                            }
                            count /= expand.length;
                        } else {
                            next.add(right);
                        }
                    }
                    if (count != 0) {
                        throw new RuntimeException();
                    }
                    addProduction(prod + 1, next.toArray());
                }
                removeProduction(prod);
            }
        }
    }
427689
function _repeat (source, times) {
    var result = "";

    for (var i = 0; i < times; i++) {
        result += source;
    }

    return result;
}
1311194
@Override
    protected String toStringInternal(final boolean useSimpleNames) {
        final StringBuilder buf = new StringBuilder();
        buf.append(
                useSimpleNames ? elementTypeSignature.toStringWithSimpleNames() : elementTypeSignature.toString());
        for (int i = 0; i < numDims; i++) {
            buf.append("[]");
        }
        return buf.toString();
    }
923890
public static char getChar(String symbol)
    {
        CharInfo info = (CharInfo) fSymbolMap.get(symbol);
        return (info != null) ? (char) info.fCode : '\0';
    }
356251
public static String getRandomString(final int size, final int start, final int length) {
		final StringBuilder buff = new StringBuilder(size);

		for (int i = 0; i < size; i++) {
			buff.append((char) (RAN.nextInt(length) + start));
		}
		return buff.toString();
	}
432818
public static FastStr of(Iterable<Character> itr) {
        StringBuilder sb = new StringBuilder();
        for (Character c : itr) {
            sb.append(c);
        }
        return of(sb);
    }
984041
public static String[] toStrings(SymbolToken[] symbols, int count)
    {
        if (count == 0) return _Private_Utils.EMPTY_STRING_ARRAY;

        String[] annotations = new String[count];
        for (int i = 0; i < count; i++)
        {
            SymbolToken tok = symbols[i];
            String text = tok.getText();
            if (text == null)
            {
                throw new UnknownSymbolException(tok.getSid());
            }
            annotations[i] = text;
        }
        return annotations;
    }
973599
function (symbol) {
        return symbolDict[symbol.charCodeAt(0)] && symbolDict[symbol.charCodeAt(0)][symbol.charCodeAt(1)] || symbolDict[symbol.charCodeAt(1)] && symbolDict[symbol.charCodeAt(0)][symbol.charCodeAt(0)];
    }