Lines Matching defs:string
133 # A function - This function will be called on every string that
154 """Format the given string using the given formatter."""
566 """Force an attribute value into a string representation.
592 # string representation of `attribute` is equal to `value`
604 # string representation of `attribute` starts with `value`
608 # string represenation of `attribute` ends with `value`
612 # string representation of `attribute` contains `value`
615 # string representation of `attribute` is either exactly
652 the string in DEFAULT_OUTPUT_ENCODING. That encoding needs to be
667 """text.string gives you text. This is for backwards
668 compatibility for Navigable*String, but for CData* it lets you
669 get the string without the CData wrapper."""
670 if attr == 'string':
692 The string will be passed into the formatter (to trigger side effects),
800 def string(self):
801 """Convenience property to get the single string within this tag.
803 :Return: If this tag has a single string child, return value
804 is that string. If this tag has no children, or more than one
806 return value is the 'string' attribute of the child tag,
814 return child.string
816 @string.setter
817 def string(self, string):
819 self.append(string.__class__(string))
843 for string in self._all_strings(True):
844 yield string
975 """Renders this tag as a string."""
1015 # First off, turn a string formatter into a function. This
1104 """Renders the contents of this tag as a Unicode string.
1113 # First off, turn a string formatter into a function. This
1172 string, a list of strings, a regular expression object, or a
1173 callable that takes a string and returns whether or not the
1174 string matches for some custom definition of 'matches'. The
1449 # Leave it alone if it's a Unicode string, a callable, a
1473 # Otherwise, convert it into a Unicode string.
1520 if found and self.text and not self._matches(found.string, self.text):
1581 # other ways of matching match the tag name as a string.
1585 # Ensure that `markup` is either a Unicode string, or None.
1589 # None matches None, False, an empty string, an empty list, and so on.
1593 # Exact string match