/* Extracts the filename including extention from the specified full filename, which could possible include a path. The function can handle both the backslash and forward slash path delimiter, to make it crossplatform.  */
bool UtilFileExtractFilename(char const *fullFilename, char *filenameBuffer)
/* Extracts the filename including extention from the specified full filename, which could possible include a path. The function can handle both the backslash and forward slash path delimiter, to make it crossplatform.  */
bool UtilFileExtractFilename(char const *fullFilename, char *filenameBuffer)
{
  bool result = false;
  char const * filenamePtr;
  assert(fullFilename != NULL);
  assert(filenameBuffer != NULL);
  if ( (fullFilename != NULL) && (filenameBuffer != NULL) )
  {
    filenamePtr = strrchr(fullFilename, '/');
    if (filenamePtr != NULL)
    {
      filenamePtr++;
    }
    else
    {
      filenamePtr = strrchr(fullFilename, '\\');
      if (filenamePtr != NULL)
      {
        filenamePtr++;
      }
      else
      {
        filenamePtr = fullFilename;
      }
    }
    strcpy(filenameBuffer, filenamePtr);
    result = true;
  }
  return result;
}