Package Bio :: Module stringfns
[hide private]
[frames] | no frames]

Module stringfns

source code

This provides useful general functions for working with strings (DEPRECATED).

This module and its C code equivalent are considered to be deprecated, and are likely to be removed in a future release of Biopython. Please get in touch via the mailing list if this will affect you.

Functions: splitany Split a string using many delimiters. find_anychar Find one of a list of characters in a string. rfind_anychar Find one of a list of characters in a string, from end to start.

Functions [hide private]
list of strings
splitany(s, sep=... , maxsplit=... , negate=...=...)
Split a string.
source code
index of a character or -1
find_anychar(string, chars, index=...)
Find a character in string.
source code
index of a character or -1
rfind_anychar(string, chars, index=...)
Find a character in string, looking from the end to the start.
source code
Variables [hide private]
  __warningregistry__ = {('Bio.stringfns and its C code equivale...
Function Details [hide private]

splitany(s, sep=... , maxsplit=... , negate=...=...)

source code 

Split a string. Similar to string.split, except that this considers any one of the characters in sep to be a delimiter. If negate is true, then everything but sep will be a separator.

Returns: list of strings

find_anychar(string, chars, index=...)

source code 

Find a character in string. chars is a list of characters to look for. Return the index of the first occurrence of any of the characters, or -1 if not found. index is the index where the search should start. By default, I search from the beginning of the string.

Returns: index of a character or -1

rfind_anychar(string, chars, index=...)

source code 

Find a character in string, looking from the end to the start. chars is a list of characters to look for. Return the index of the first occurrence of any of the characters, or -1 if not found. index is the index where the search should start. By default, I search from the end of the string.

Returns: index of a character or -1

Variables Details [hide private]

__warningregistry__

Value:
{('Bio.stringfns and its C code equivalent Bio.cstringfns are deprecat\
ed, and will be removed in a future release of Biopython.  If you want\
 to continue to use this code, please get in contact with the Biopytho\
n developers via the mailing lists to avoid its permanent removal from\
 Biopython.',
  <type 'exceptions.DeprecationWarning'>,
  25): 1}