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

Last change on this file since 197 was 197, checked in by Maciej Komosinski, 7 years ago

GDK used by developers since 1999, distributed on the web since 2002

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1// This file is a part of the Framsticks GDK.
2// Copyright (C) 1999-2014  Maciej Komosinski and Szymon Ulatowski.  See LICENSE.txt for details.
3// Refer to http://www.framsticks.com/ for further information.
4
5#ifndef _SSTRINGUTILS_H_
6#define _SSTRINGUTILS_H_
7
8#include "sstring.h"
9#include <frams/virtfile/virtfile.h>
10
11/// return: 1=ok 0=error
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);
15
16int quoteTilde(SString &target);
17int unquoteTilde(SString &target);
18
19bool strContainsOneOf(const char* str,const char* chars);
20bool sstringQuote(SString& target);
21const char* skipQuoteString(const char* txt, const char* limit);
22int sstringUnquote(SString &target);
23
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);
27
28SString trim(SString& s); //remove leading/trailing whitespace
29bool removeCR(SString& s); //remove '\r' return true if changed
30
31#endif
32
Note: See TracBrowser for help on using the repository browser.