Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
common
utilities
imgui
wrap.h
Go to the documentation of this file.
1
// License: Apache 2.0. See LICENSE file in root directory.
2
// Copyright(c) 2020 Intel Corporation. All Rights Reserved.
3
4
#pragma once
5
6
namespace
utilities
{
7
namespace
imgui {
8
9
// Wrap text according to input width
10
// - Input: - text as a string
11
// - wrapping width
12
// - Output: - on success - wrapped text
13
// - on failure - an empty string
14
// Example:
15
// Input:
16
// this is the first line\nthis is the second line\nthis is the last line , wrap_width = 150 [pixels]
17
// Output:
18
// this is the\nfirst line\nthis is the\nsecond line\nthis is the last\nline
19
// Note: If the paragraph contain multiple spaces, it will be trimmed into a single space.
20
std::string
wrap
(
const
std::string
& text,
int
wrap_pixels_width );
21
22
}
// namespace imgui
23
}
// namespace utilities
string
GLsizei const GLchar *const * string
Definition:
glad/glad/glad.h:2862
utilities
Definition:
wrap.cpp:11
utilities::imgui::wrap
std::string wrap(const std::string &text, int wrap_pixels_width)
Definition:
wrap.cpp:98
librealsense2
Author(s): Sergey Dorodnicov
, Doron Hirshberg
, Mark Horn
, Reagan Lopez
, Itay Carpis
autogenerated on Mon May 3 2021 02:50:23