source: cpp/frams/util/sstringutils.h @ 438

Last change on this file since 438 was 382, checked in by sz, 10 years ago

Moving frams/virtfile to common/virtfile:

  • file references updated (includes, makefile)
  • common/virtfile can no longer use the Framsticks specific SString (using std::string instead)
  • Property svn:eol-style set to native
File size: 1.3 KB
RevLine 
[286]1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
2// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
3// See LICENSE.txt for details.
[109]4
5#ifndef _SSTRINGUTILS_H_
6#define _SSTRINGUTILS_H_
7
8#include "sstring.h"
[382]9#include <common/virtfile/virtfile.h>
[109]10
11/// return: 1=ok 0=error
[257]12int loadSString(const char* filename, SString& s, const char* framsgmodule = 0, const char* error = 0);
13void loadSString(VirtFILE *f, SString& s);
14bool loadSStringLine(VirtFILE* f, SString &s);
[109]15
16int quoteTilde(SString &target);
17int unquoteTilde(SString &target);
18
[257]19bool strContainsOneOf(const char* str, const char* chars);
[109]20bool sstringQuote(SString& target);
21const char* skipQuoteString(const char* txt, const char* limit);
22int sstringUnquote(SString &target);
23
[257]24int strFindField(const SString& txt, const SString& name, int &end);
25SString strGetField(const SString& txt, const SString& name);
26void strSetField(SString& txt, const SString& name, const SString& value);
[109]27
[210]28SString trim(SString& s); ///< remove leading/trailing whitespace
29bool removeCR(SString& s); ///< remove '\r' return true if changed
[257]30bool matchWildcard(const SString& word, const SString& pattern);///< '*' in pattern matches any substring
31bool matchWildcardList(const SString& word, const SString& patterns);///< patterns is a list of patterns (separated by ',')
[109]32
33#endif
Note: See TracBrowser for help on using the repository browser.