Blender
V5.0
source
blender
imbuf
opencolorio
intern
description.cc
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2025 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#include "
description.hh
"
6
7
#include "
BLI_utildefines.h
"
8
9
namespace
blender::ocio
{
10
11
std::string
cleanup_description
(
const
StringRef
description)
12
{
13
if
(description.
is_empty
()) {
14
return
""
;
15
}
16
17
std::string
result
= description.
trim
(
"\r\n"
);
18
19
for
(
char
&ch :
result
) {
20
if
(
ELEM
(ch,
'\r'
,
'\n'
)) {
21
ch =
' '
;
22
}
23
}
24
25
return
result
;
26
}
27
28
}
// namespace blender::ocio
result
double result
Definition
BLI_expr_pylike_eval_test.cc:351
BLI_utildefines.h
ELEM
#define ELEM(...)
Definition
BLI_utildefines.h:144
blender::StringRefBase::is_empty
constexpr bool is_empty() const
Definition
BLI_string_ref.hh:186
blender::StringRefBase::trim
constexpr StringRef trim() const
Definition
BLI_string_ref.hh:396
blender::StringRef
Definition
BLI_string_ref.hh:150
description.hh
blender::ocio
Definition
BLF_api.hh:35
blender::ocio::cleanup_description
std::string cleanup_description(const StringRef description)
Definition
description.cc:11
Generated on
for Blender by
doxygen
1.16.1