    inline const char *split_filename(const char *const filename, char *const body=0) {
      if (!filename) { if (body) *body = 0; return ""; }
      const char * p = std::strrchr(filename,'.');
      if (!p || std::strchr(p,'/') || std::strchr(p,'\\')) { // No extension.
        if (body) std::strcpy(body,filename);
        return filename + std::strlen(filename);
      }
      const unsigned int l = (unsigned int)(p - filename);
      if (body) { if (l) std::memcpy(body,filename,l); body[l] = 0; }
      return p + 1;
    }
    inline const char *split_filename(const char *const filename, char *const body=0) {
      if (!filename) { if (body) *body = 0; return ""; }
      const char * p = std::strrchr(filename,'.');
      if (!p || std::strchr(p,'/') || std::strchr(p,'\\')) {  
        if (body) std::strcpy(body,filename);
        return filename + std::strlen(filename);
      }
      const unsigned int l = (unsigned int)(p - filename);
      if (body) { if (l) std::memcpy(body,filename,l); body[l] = 0; }
      return p + 1;
    }