Logo
Explore Help
Sign In
xymp
/
exiv2
3
0
Fork
You've already forked exiv2
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
v0.27.3
main
Branches Tags
${ item.name }
Create tag ${ searchTerm }
Create branch ${ searchTerm }
from 'f145fae33b'
${ noResults }
exiv2/src/helper_functions.cpp

14 lines
312 B
C++
Raw Normal View History Unescape Escape

Use SPDX for licenses (#2122) * Use SPDX identifier in header files * Use SPDX identifier in rest of source files * Fix usage of SPDX for files with 2 licenses * Add global license file * Fix compilation
3 years ago
// SPDX-License-Identifier: GPL-2.0-or-later
Add helper_functions.cpp/hpp & unit tests - add function which constructs a new std::string from a potentially not null terminated char * - add unit tests
7 years ago
#include "helper_functions.hpp"
C++-style headers
3 years ago
#include <cstring>
Add helper_functions.cpp/hpp & unit tests - add function which constructs a new std::string from a potentially not null terminated char * - add unit tests
7 years ago
Update .clang-format file & apply clang-format to whole project
3 years ago
std::string string_from_unterminated(const char* data, size_t data_length) {
if (data_length == 0) {
return {};
}
const size_t StringLength = strnlen(data, data_length);
return {data, StringLength};
Add helper_functions.cpp/hpp & unit tests - add function which constructs a new std::string from a potentially not null terminated char * - add unit tests
7 years ago
}
Powered by Gitea Version: 1.19.3 Page: 118ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API