Ignore:
Timestamp:
Feb 11, 2000, 7:35:55 PM (26 years ago)
Author:
bird
Message:

Odin32 DB.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/common/kFileDef.cpp

    r824 r2759  
    2828static char *dupeString(const char *psz);
    2929static char *trim(char *psz);
    30 
     30static char *removeFnutts(char *pszStr);
    3131
    3232/**
     
    301301                }
    302302
     303                removeFnutts((**ppe).pszIntName);
     304                removeFnutts((**ppe).pszName);
    303305                ppe = &(**ppe).pNext;
    304306            }
     
    494496
    495497
     498/**
     499 * Removes '"' and ''' at start and end of the string.
     500 * @returns     pszStr!
     501 * @param       pszStr  String that is to have "s and 's removed.
     502 */
     503static char *removeFnutts(char *pszStr)
     504{
     505    if (pszStr != NULL)
     506    {
     507        int cch = strlen(pszStr);
     508        if (cch > 0 && (pszStr[cch-1] == '"' || pszStr[cch-1] == '\''))
     509            pszStr[cch-1] = '\0';
     510
     511        if (*pszStr == '"' || *pszStr == '\'')
     512            memmove(pszStr, pszStr+1, cch-1);
     513    }
     514    return pszStr;
     515}
Note: See TracChangeset for help on using the changeset viewer.