MCPcopy Create free account
hub / github.com/BoomingTech/Piccolo / GetIndentLevel

Function GetIndentLevel

engine/3rdparty/tinyobjloader/deps/cpplint.py:1635–1648  ·  view source on GitHub ↗

Return the number of leading spaces in line. Args: line: A string to check. Returns: An integer count of leading spaces, possibly zero.

(line)

Source from the content-addressed store, hash-verified

1633
1634
1635def GetIndentLevel(line):
1636 """Return the number of leading spaces in line.
1637
1638 Args:
1639 line: A string to check.
1640
1641 Returns:
1642 An integer count of leading spaces, possibly zero.
1643 """
1644 indent = Match(r'^( *)\S', line)
1645 if indent:
1646 return len(indent.group(1))
1647 else:
1648 return 0
1649
1650
1651def GetHeaderGuardCPPVariable(filename):

Callers 2

__init__Method · 0.85
CheckBracesFunction · 0.85

Calls 1

MatchFunction · 0.85

Tested by

no test coverage detected