MCPcopy Create free account
hub / github.com/executablebooks/markdown-it-py / charStrAt

Function charStrAt

markdown_it/common/utils.py:28–40  ·  view source on GitHub ↗

Returns the Unicode value of the character at the specified location. @param - index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned. This was added for compatibility with python

(src: str, pos: int)

Source from the content-addressed store, hash-verified

26
27
28def charStrAt(src: str, pos: int) -> str | None:
29 """
30 Returns the Unicode value of the character at the specified location.
31
32 @param - index The zero-based index of the desired character.
33 If there is no character at the specified index, NaN is returned.
34
35 This was added for compatibility with python
36 """
37 try:
38 return src[pos]
39 except IndexError:
40 return None
41
42
43_ItemTV = TypeVar("_ItemTV")

Callers 3

newlineFunction · 0.85
escapedSplitFunction · 0.85
tableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…