MCPcopy Index your code
hub / github.com/executablebooks/markdown-it-py / charCodeAt

Function charCodeAt

markdown_it/common/utils.py:13–25  ·  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

11
12
13def charCodeAt(src: str, pos: int) -> int | None:
14 """
15 Returns the Unicode value of the character at the specified location.
16
17 @param - index The zero-based index of the desired character.
18 If there is no character at the specified index, NaN is returned.
19
20 This was added for compatibility with python
21 """
22 try:
23 return ord(src[pos])
24 except IndexError:
25 return None
26
27
28def charStrAt(src: str, pos: int) -> str | None:

Callers 4

process_inlinesFunction · 0.85
parseLinkDestinationFunction · 0.85
parseLinkTitleFunction · 0.85
referenceFunction · 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…