returns the input string repeated the specified number of times
@param {string} - input string to repeat
@param {number} - the number of times to repeat
@returns {string}
@alias module:string-tools.repeat
176047
function repeat(input, times){
    var output = "";
    for (var i = 0; i < times; i++){
        output += input;
    }
    return output;
}
1368585
static String repeat(final String toBeRepeated, final int numTimes) {
        final StringBuilder builder = new StringBuilder();

        for (int i = 0; i < numTimes; i++) {
            builder.append(toBeRepeated);
        }
        return builder.toString();
    }
1172740
public static String repeat(char c, int count) {
      StringBuilder builder = new StringBuilder();
      for (int i = 0; i < count; i++) {
         builder.append(c);
      }
      return builder.toString();
   }
444211
function repeat (string, width) {
  var result = ''
  var n = width
  do {
    if (n % 2) {
      result += string
    }
    n = Math.floor(n / 2)
    /* eslint no-self-assign: 0 */
    string += string
  } while (n && stringWidth(result) < width)

  return wideTruncate(result, width)
}
928959
def repeat(self, target, sender, **kwargs):
        ""
        if target.startswith("#"):
            self.message(target, kwargs["msg"])
        else:
            self.message(sender, kwargs["msg"])
2852
function str(input) {
  if (!is('String', input)) return;
  return root[input] || (root.require || require)(input);
}
1174952
function regexFromString(string) {
  var r = /::|\*\*|:[a-zA-Z_]+|\*/g;
  var match;
  var regexString = '^';
  var previousIndex = 0;
  var regexKeys = [];
  var starKey = 0;
  while ((match = r.exec(string)) !== null) {
    var matched = match[0];
    var index = match.index;
    regexString += escapeRegex(string.slice(previousIndex, index));
    previousIndex = index;
    if (matched === '**') {
      regexString += '\\*\\*';
      previousIndex += 2;
    } else if (matched === '::') {
      regexString += '::';
      previousIndex += 2;
    } else if (matched === '*') {
      regexString += '(.*)';
      regexKeys.push(starKey);
      previousIndex += 1;
      starKey++;
    } else {  // :foo
      regexString += '([^/]+)';
      regexKeys.push(matched.slice(1));
      previousIndex += matched.length;
    }
  }
  regexString += escapeRegex(string.slice(previousIndex)) + '$';
  var regex = new RegExp(regexString);
  regex.keys = regexKeys;
  return regex;
}
31257
function repeat(ch, count)
{
    var s = '';
    for(var i = 0; i < count; i++)
        s += ch;
    return s;
}
512496
public String generator(int repeat) {
    String repeater = "&nbsp;";
    StringBuilder returnval = new StringBuilder();
    for (int i = 0; i < repeat; i++) {
      returnval.append(repeater);
    }
    return returnval.toString();
  }
934450
def __replace_repeat(sentence):
    

    ######### USE SENTENCE_ID 47 for testing!

    repeat_dict = {}

    if sentence is not None:

        while sentence.find('#DEFINE_REPEAT') != -1:
            begin_index = sentence.find('#DEFINE_REPEAT')
            start_index = begin_index + 15
            end_index = sentence.find(']')

            if sentence.find('#DEFINE_REPEAT') is not None:
                sub_list = sentence[start_index:end_index].split(',')
                choice = sub_list[0]
                repeat_text = sub_list[1]
                repeat_dict[choice] = repeat_text
                sentence = sentence.replace(sentence[begin_index:end_index + 1], '', 1)

        while sentence.find('#REPEAT') != -1:
            if sentence.find('#REPEAT') is not None:
                repeat_begin_index = sentence.find('#REPEAT')
                repeat_start_index = repeat_begin_index + 8
                # by searching from repeat_index below we don't encounter dodgy bracket-matching errors.
                repeat_end_index = sentence.find(']', repeat_start_index)
                repeat_index = sentence[repeat_start_index:repeat_end_index]

                if repeat_index in repeat_dict:
                    sentence = sentence.replace(sentence[repeat_begin_index:repeat_end_index + 1],
                                                  str(repeat_dict[repeat_index]))

        if sentence.find('#REPEAT') == -1:
            return sentence
        return sentence
    else:
        return sentence
634132
public static String repeat(String string, String separator, int count) {
		// 参数验证
		$.checkNotNull(string);
		Preconditions.checkArgument(count >= 0, "invalid count: %s", count);
		String sep = null == separator ? "" : separator;

		StringBuffer sb = new StringBuffer();
		int forCount = count - 1;
		for (int i = 0; i < forCount; i++) {
			sb.append(string).append(sep);
		}
		sb.append(string);

		return sb.toString();
	}
826848
function uniqueStrings(input){
	const output = {};
	for(let i = 0, l = input.length; i < l; ++i)
		output[input[i]] = true;
	return Object.keys(output);
}
169717
def repeat(self, count=2):
        
        # Subtracting one from the count means the code mentioned is
        # truly repeated exactly `count` times.
        # Control().move_up().repeat(3) ==
        # Control().move_up().move_up().move_up()
        try:
            return self.__class__(''.join((
                str(self),
                self.last_code() * (count - 1),
            )))
        except TypeError as ex:
            raise TypeError(
                '`count` must be an integer. Got: {!r}'.format(count)
            ) from ex
659581
def repeat(self, rid, count, index=0):
        
        elems = None
        if rid in self.__repeat_ids:
            elems = self.__repeat_ids[rid]
        elif rid in self.__element_ids:
            elems = self.__element_ids

        if elems and index < len(elems):
            elem = elems[index]
            self.__repeat(elem, count)
285334
def rept(ctx, text, number_times):
    
    if number_times < 0:
        raise ValueError("Number of times can't be negative")
    return conversions.to_string(text, ctx) * conversions.to_integer(number_times, ctx)
949402
function(str, times) {
        if (String.prototype.repeat) return str.repeat(times);
        return Array.apply(null, new Array(times)).map(function() {
          return str;
        }).join('');
      }
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);
		}