MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / lstrip

Method lstrip

lib/sqlalchemy/dialects/postgresql/bitstring.py:131–141  ·  view source on GitHub ↗

Returns a copy of the BitString with leading characters removed. If omitted or None, 'chars' defaults '0':: BitString("00010101000").lstrip() == BitString("00010101") BitString("11110101111").lstrip("1") == BitString("1111010")

(self, char: str | None = None)

Source from the content-addressed store, hash-verified

129 )
130
131 def lstrip(self, char: str | None = None) -> BitString:
132 """Returns a copy of the BitString with leading characters removed.
133
134 If omitted or None, 'chars' defaults '0'::
135
136 BitString("00010101000").lstrip() == BitString("00010101")
137 BitString("11110101111").lstrip("1") == BitString("1111010")
138 """
139 if char is None:
140 char = "0"
141 return BitString(super().lstrip(char), False)
142
143 def rstrip(self, char: str | None = "0") -> BitString:
144 """Returns a copy of the BitString with trailing characters removed.

Callers 8

instrumentFunction · 0.80
makepropFunction · 0.80
from_bytesMethod · 0.80
_detect_decimal_charMethod · 0.80
format_savepointMethod · 0.80
_schema_elementsFunction · 0.80
inject_param_textFunction · 0.80
test_string_methodsMethod · 0.80

Calls 1

BitStringClass · 0.85

Tested by 1

test_string_methodsMethod · 0.64