IDE-Generator Python
Loading...
Searching...
No Matches
ide_gen.string_utils Namespace Reference

Sub file for ide_gen. More...

Functions

 xcode_quote_string_if_needed (input_path)
 Quote a string for XCode.
 xcode_determine_source_type (input_path)
 Using a file extension, map to XCode file type.

Variables

 _XCODESAFESET
 Valid characters for XCode strings without quoting.
list _XCODE_FILE_TYPES

Detailed Description

Sub file for ide_gen.

Subroutines to handle string fixups for IDE projects

This module contains classes needed to fixup strings for IDE projects

Function Documentation

◆ xcode_determine_source_type()

ide_gen.string_utils.xcode_determine_source_type ( input_path)

Using a file extension, map to XCode file type.

Parameters
input_pathPathname to test
Returns
Xcode filetype string or "sourcecode.c.h"

◆ xcode_quote_string_if_needed()

ide_gen.string_utils.xcode_quote_string_if_needed ( input_path)

Quote a string for XCode.

XCode requires quotes for certain characters. If any illegal character exist in the string, the string will be reencoded to a quoted string using XCode JSON rules.

Parameters
input_pathstring to encapsulate.
Returns
Original input string if XCode can accept it or properly quoted