2022-04-10 08:22:58 +00:00
|
|
|
// Copyright 2022 Dietrich Epp.
|
|
|
|
// This file is part of SyncFiles. SyncFiles is licensed under the terms of the
|
|
|
|
// Mozilla Public License, version 2.0. See LICENSE.txt for details.
|
2022-04-10 08:09:17 +00:00
|
|
|
#ifndef MACOS_STRUTIL_H
|
|
|
|
#define MACOS_STRUTIL_H
|
|
|
|
|
2022-11-18 01:38:03 +00:00
|
|
|
// StrFormat writes a formatted string to another string, replacing it.
|
2022-04-10 08:09:17 +00:00
|
|
|
void StrFormat(unsigned char *dest, const unsigned char *msg, ...);
|
|
|
|
|
2022-11-18 01:38:03 +00:00
|
|
|
// StrAppend appends a formatted string to another string.
|
2022-04-10 08:09:17 +00:00
|
|
|
//
|
|
|
|
// %% - literal %
|
|
|
|
// %d - int argument
|
|
|
|
// %S - Pascal string argument
|
|
|
|
void StrAppendFormat(unsigned char *dest, const unsigned char *msg, ...);
|
|
|
|
|
2022-11-18 01:38:03 +00:00
|
|
|
// StrCopy copies a Pascal string. Aborts the program if the string does not fit
|
|
|
|
// in the destination buffer.
|
2022-04-10 08:09:17 +00:00
|
|
|
void StrCopy(unsigned char *dest, int dest_size, unsigned char *src);
|
|
|
|
|
2022-11-18 01:38:03 +00:00
|
|
|
// StrSubstitute substitute ^1 in the string with param.
|
2022-04-10 08:09:17 +00:00
|
|
|
void StrSubstitute(unsigned char *str, const unsigned char *param);
|
|
|
|
|
|
|
|
#endif
|