Добавил:
Kaz
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Лаба 1-6 Системное программирование для ОС Windows [Вариант отсутствует, общий] / Лаба 4 / PhoneDB / delimstrings
.h#pragma once
#include "stdafx.h"
// Copies string 'src' terminated by one of symbols in 'delim' string, which is null-terminated
// ATTENTION: function doesn't put '\0' to the end of copied string.
// char dst[cchDstSize];
//
// size_t retval = DelimStrCpy(dst, "somestring;anotherstring;", ";", limit, cchDstSize-1);
// dst[retval] = '\0'; to get "somestring;" in 'dst'
//
size_t DelimStrCpy(char *dst,
const char *src,
const char *delim,
const char *limit,
size_t cchDstSize);