Sync
[ntk/apt.git] / apt-pkg / contrib / strutl.h
1 // -*- mode: cpp; mode: fold -*-
2 // Description /*{{{*/
3 // $Id: strutl.h,v 1.1 1998/07/07 04:17:16 jgg Exp $
4 /* ######################################################################
5
6 String Util - These are some usefull string functions
7
8 _strstrip is a function to remove whitespace from the front and end
9 of a string.
10
11 This source is placed in the Public Domain, do with it what you will
12 It was originally written by Jason Gunthorpe <jgg@gpu.srv.ualberta.ca>
13
14 ##################################################################### */
15 /*}}}*/
16 // This is a private header
17 // Header section: /
18 #ifndef STRUTL_H
19 #define STRUTL_H
20
21 #include <stdlib.h>
22 #include <string>
23
24 char *_strstrip(char *String);
25 char *_strtabexpand(char *String,size_t Len);
26 bool ParseQuoteWord(const char *&String,string &Res);
27 string QuoteString(string Str,const char *Bad);
28 string SizeToStr(double Bytes);
29 string TimeToStr(unsigned long Sec);
30 string SubstVar(string Str,string Subst,string Contents);
31 string Base64Encode(string Str);
32
33 int stringcmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
34 int stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
35
36 #endif