Converts a set of cards to card codes.

@name setCardCodes
@function
@param {Set.<String>} set card strings set, i.e. `Set({'Ah', 'Ks', 'Td', '3c, 'Ad'})`
@return {Set.<Number>} card code set
432262
function setCardCodes(set) {
  const codeSet = new Set()
  for (const v of set) codeSet.add(cardCode(v))
  return codeSet
}
307044
public function assign(array $cards)
    {
        return json_encode(array_map(function ($card) {
            return $this->attachExtension($card['card_id'], $card);
        }, $cards));
    }
577608
function(number) {
      if (typeof number !== 'string') {
        throw new TypeError('cardNumber must be a string!');
      }

      var cardNumber = number.trim().replace(/\s/g, '');

      return new Card(cardNumber);
    }
188800
function(itemSet, symbol){

            var self = this,
                gotoItemSet = new DataTypes.ItemSet();

            _.each(itemSet.subItems, function(item){
                if(item.dotSymbol === symbol){
                    gotoItemSet.push(new DataTypes.Item(item.production, item.dotPosition+1, item.lookaheads));
                }
            });

            return gotoItemSet;
        }
655556
public AsciiSet union(AsciiSet set) {
    final boolean[] unionMembers = new boolean[128];
    for (int i = 0; i < unionMembers.length; ++i) {
      unionMembers[i] = members[i] || set.members[i];
    }
    return new AsciiSet(unionMembers);
  }
599625
function(set) {
            if (!set || !set.length) return;
            var i = 1,
                l = set.length,
                current,
                master = set[0],
                tmp;
            master = [
                master._x,
                master._y,
                master._x + master._w,
                master._y + master._h
            ];
            while (i < l) {
                current = set[i];
                tmp = [
                    current._x,
                    current._y,
                    current._x + current._w,
                    current._y + current._h
                ];
                if (tmp[0] < master[0]) master[0] = tmp[0];
                if (tmp[1] < master[1]) master[1] = tmp[1];
                if (tmp[2] > master[2]) master[2] = tmp[2];
                if (tmp[3] > master[3]) master[3] = tmp[3];
                i++;
            }
            tmp = master;
            master = {
                _x: tmp[0],
                _y: tmp[1],
                _w: tmp[2] - tmp[0],
                _h: tmp[3] - tmp[1]
            };

            return master;
        }
559302
function hashSet(hash, key, value) {
        hash[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
      }
108860
function lset(key, index, value, req) {
  var val = this.getKey(key, req);
  if(val === undefined) return null;
  val = val.lset(index, value);
  return val !== null ? OK : null;
}
397724
public Set<Key> keySet(int access) {

	Set<Key> set = new LinkedHashSet<Key>();
	Map.Entry<Key, Member> entry;
	Iterator<Entry<Key, Member>> it = _data.entrySet().iterator();
	while (it.hasNext()) {
	    entry = it.next();
	    if (entry.getValue().getAccess() <= access) set.add(entry.getKey());
	}
	return set;
    }
116519
function(_set1, _set2) {
        var hash = {}, uniq = [],
            fullSet = _set1.concat(_set2);

        for (var i = 0; i < fullSet.length; i++) {
            if (fullSet[i] !== undefined) hash[fullSet[i].toString()] = fullSet[i];
        }

        for (var key in hash) {
            uniq.push(hash[key]);
        }
        return uniq;
    }
1293835
private static Set<String> setFor( String... elements ) {
        Set<String> set = new HashSet<String>(elements.length);
        set.addAll(Arrays.asList(elements));

        return set;
    }
793879
function printCards(cards, language, indexed = false) {
  checkLanguage(language)
  // Ensure parameter is an array, even when one card is passed in
  const cardsToPrint = Array.isArray(cards) ? cards : [cards]
  if (!cardsToPrint.length) {
    return getPhrase('player:no-cards', language)()
  }
  if (indexed) {
    return cardsToPrint.map((card, idx) => {
      return `${idx + 1}) ${getCardName(card, language)}`
    }).join(' ')
  }
  return cardsToPrint.map((card) => {
    return getCardName(card, language)
  }).join(', ')
}
1333520
function _same_set(set1, set2){
	var h1 = {};
	var h2 = {};
	for( var h1i = 0; h1i < set1.length; h1i++ ){ h1[set1[h1i]] = 1; }
	for( var h2i = 0; h2i < set2.length; h2i++ ){ h2[set2[h2i]] = 1; }
	return _same_hash(h1, h2);
    }
962872
function generateString(set, length) {
    var content = '';

    // Cannot generate a string from an empty set
    if (set.length <= 0) {
      return content;
    }

    for (var i = 0; i < length; i++) {
      content += String.fromCharCode(
        set[Math.floor(Math.random() * set.length)]
      );
    }

    return content;
  }
565943
function vCard() {

  if( !(this instanceof vCard) )
    return new vCard()

  /** @type {String} Version number */
  this.version = vCard.versions[ vCard.versions.length - 1 ]
  /** @type {Object} Card data */
  this.data = {}

}
983234
function stringifyCardCode(code) {
  const rank = code & 0b111100
  const suit = code & 0b000011
  return rankCodeStrings[rank] + suitCodeStrings[suit]
}
837532
function (card) {
	if (typeof card == 'number')
		return card >= 1 && card <= deckSize ? card : undefined; // Already codified
	if (typeof card != 'string' || card.length != 2)
		return undefined; // Invalid input
	var posRank = abbr[card[0]];
	var posSuit = (abbr[card[1]] - ranks.length) >> 1;
	if (typeof posRank != 'number' || posRank >= ranks.length || posSuit < 0)
		return undefined; // Invalid characters
	return posRank * suits.length + posSuit + 1;
}