Check for the same value and apply setting! Search in SD card

Hello, in one of my works I extract weather forecast data from Yahoo. In their documentation ( it is defined a code to every weather conditions.. After I extract this code, instead of the description, I wrote a txt file in the sd card with the code and respective description, like:

[0=tornado] --> [settingname=settingvalue]

I wrote a function to read from sd card, each one of this names and values to other things in the program:

// Função de Leitura dos dados no Cartão SD
void readSD(File fileName, char* fileTXT) {
  char character;
  String settingName;
  String settingValue;
  fileName =;
  if (fileName) {
    while (fileName.available()) {
      character =;
      while ((fileName.available()) && (character != '[')) {
        character =;
      character =;
      while ((fileName.available()) && (character != '=')) {
        settingName = settingName + character;
        character =;
      character =;
      while ((fileName.available()) && (character != ']')) {
        settingValue = settingValue + character;
        character =;
      if (character == ']') {
        // Apply the value to the parameter
        applySetting(settingName, settingValue);
        // Reset Strings
        settingName = "";
        settingValue = "";
    // close the file:
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening .txt");

But now, I want a function to compare the code extracted from yahoo with the ones in the sd card, and after that, apply the description, p.e, if code = 0, it will search in the txt for that settingname, applying the description after that.
Thanks, António

Did you have a question?

SORRY!! I must have deleted, after I edited the post! I want to compare the received weather code, with the ones wrote in the sd card, and apply the corresponding description!