MCPcopy Create free account
hub / github.com/SimpleITK/SimpleITK / quote_string

Function quote_string

ExpandTemplateGenerator/ExpandTemplate.py:21–26  ·  view source on GitHub ↗

A Jinja2 filter that quotes a string.

(s:str)

Source from the content-addressed store, hash-verified

19
20
21def quote_string(s:str) -> str: # pragma: no cover
22 """A Jinja2 filter that quotes a string."""
23 if not isinstance(s, str):
24 logging.error("Input must be a string.")
25 return s
26 return f'"{s}"'
27
28def ruby_capitalize(s:str) -> str:
29 """A Jinja2 filter that capitalizes the first letter of each word in a string."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected