MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / to_snake_case

Function to_snake_case

framework/common/utils.cpp:187–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185 std::stringstream result;
186
187 for (const auto ch : text)
188 {
189 if (std::isalpha(ch))
190 {
191 if (std::isspace(ch))
192 {
193 result << "_";
194 }
195 else
196 {
197 if (std::isupper(ch))
198 {
199 result << "_";
200 }
201
202 result << static_cast<char>(std::tolower(ch));
203 }
204 }
205 else
206 {
207 result << ch;
208 }
209 }
210
211 return result.str();
212}
213
214sg::Light &add_light(vkb::scene_graph::SceneC &scene,
215 sg::LightType type,
216 const glm::vec3 &position,
217 const glm::quat &rotation,
218 const sg::LightProperties &props,
219 vkb::scene_graph::NodeC *parent_node)

Callers 1

load_sceneMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected