Personal tools
You are here: Home development Google Summer of Code StringLibrary

Possible Mentors

  • Bryan Jurish


Pd's lack of a string data type can make easy tasks such as filename parsing, network communications, etc. inordinately difficult to accomplish without relying on additional externals (e.g. py/pyext, lua). For various reasons, none of the known existing workarounds (e.g. Bryan Jurish's [pdstring]? externals, Martin Peach's string patch), has established itself as a standard string handling mechanism for Pd, requiring either inordinate amounts of memory and processing time, or a patch to the Pd sources. Miller Puckette and others have suggested the use of Pd arrays for string storage.

This project should implement a basic character and string handling library for Pd, using Pd arrays directly for string storage. Elementary string handling functions (i.e. analogs of the C functions declared in "string.h") should be implemented where possible directly on arrays, and a C API should be provided for conversion of Pd arrays to and from C strings (char*, rsp. wchar_t*). If time and interest permit, additional string utilities (e.g. encoding with iconv and/or recode, regular expressions, tokenization, etc.) can be implemented on top of this API.

Links and Resources:

Required Skills

  • some knowledge of C programming


Easy (but time consuming) to moderate, depending on how much functionality is implemented directly on Pd arrays, and how much is left to the C library functions.

Possible Breakdown of Steps

  • Step 1: array-to-string and string-to-array conversion API and externals

    • ideally, should be compatible with both Pd-vanilla and Pd-extended

  • Step 2: string.h wrapper externals, e.g. for:

    • strcat(), strncat()

    • strchr(), strrchr()

    • strcmp(), strncmp(), strcoll()

    • strcpy(), strncpy()

    • strspn(), strcspn()

    • strpbrk()

    • strstr()

    • strtok()

  • Optional: recoding externals (e.g. with iconv, recode)

  • Optional: regular expression externals (e.g. with Spencer, PCRE)

Powered by IEM Powered by Plone Section 508 WCAG Valid XHTML Valid CSS Usable in any browser