Sha256: 44a5152ba60516bdaad712b2472254206a1b8f565b54395a0d43608ce59fe11c

Contents?: true

Size: 441 Bytes

Versions: 15

Compression:

Stored size: 441 Bytes

Contents

#include "charmap.h"
#include <ctype.h>

const char CHARMAP[CHARMAP_SIZE] = {
  'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
  'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5'
};

int charmap_index(const char character)
{
  char upped = toupper(character);

  for (int index = 0; index < CHARMAP_SIZE; ++index)
    if (CHARMAP[index] == upped) return index;

  return (-1);
}

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
salesforce_id-1.4.6 ext/salesforce_id/charmap.c
salesforce_id-1.4.5 ext/salesforce_id/charmap.c
salesforce_id-1.4.4 ext/salesforce_id/charmap.c
salesforce_id-1.4.3 ext/salesforce_id/charmap.c
salesforce_id-1.4.2 ext/salesforce_id/charmap.c
salesforce_id-1.4.1 ext/salesforce_id/charmap.c
salesforce_id-1.4.0 ext/salesforce_id/charmap.c
salesforce_id-1.3.4 ext/salesforce_id/charmap.c
salesforce_id-1.3.3 ext/salesforce_id/charmap.c
salesforce_id-1.3.2 ext/salesforce_id/charmap.c
salesforce_id-1.3.1 ext/salesforce_id/charmap.c
salesforce_id-1.3.0 ext/salesforce_id/charmap.c
salesforce_id-1.2.0 ext/salesforce_id/charmap.c
salesforce_id-1.1.0 ext/salesforce_id/charmap.c
salesforce_id-1.0.0 ext/salesforce_id/charmap.c