8000 GitHub - atpalmer-python/python-cstring at 9ed5048ca8599fe43de020bfc6d3fcfca54b1d61
[go: up one dir, main page]

Skip to content

atpalmer-python/python-cstring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cstring Module

Alternate string representation to the built-in str type.

  • Uses C-string representation internally.
  • Memory is allocated in one continuous buffer to reduce pointer-hopping.
  • UTF-8 encoding.
  • len returns size in bytes (not including terminating zero-byte).
  • Random access (to bytes, not Unicode code points) is supported with indices and slices.

TODO

  • Write docs (see str type docs)
  • Write docstrings
  • Fill out setup.py
  • Allow initialization from bytes, bytearray, other cstrings, memoryview?, other?
  • Read __cstring__ "dunder" on objects, if available?
  • Implement iter (iterate over Unicode code points, "runes")
  • Implement str methods
  • Implement buffer interface?
  • Decide subclassing protocol

About

Provides a Python string implementation based on C's nul-terminated strings.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0