def _string_to_c_symbol(string):
    """Converts a string to a valid C symbol

    Args:
      string: The string to convert

    Returns:
      The converted string
    """
    out = ""
    for character in string.elems():
        if character.isalnum():
            out += character
        else:
            out += "_"
    return out