Home / Function/ _strremoveprefix() — langchain Function Reference

_strremoveprefix() — langchain Function Reference

Architecture documentation for the _strremoveprefix() function in configurable.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  0cde56cc_63cb_89b2_f480_050047451440["_strremoveprefix()"]
  3e4f3163_58be_ee5e_f841_ae0bd0577190["configurable.py"]
  0cde56cc_63cb_89b2_f480_050047451440 -->|defined in| 3e4f3163_58be_ee5e_f841_ae0bd0577190
  c12a4697_205a_5c93_6ef5_bbaf7294df27["_prepare()"]
  c12a4697_205a_5c93_6ef5_bbaf7294df27 -->|calls| 0cde56cc_63cb_89b2_f480_050047451440
  style 0cde56cc_63cb_89b2_f480_050047451440 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/runnables/configurable.py lines 641–643

def _strremoveprefix(s: str, prefix: str) -> str:
    """`str.removeprefix()` is only available in Python 3.9+."""
    return s.replace(prefix, "", 1) if s.startswith(prefix) else s

Subdomains

Called By

Frequently Asked Questions

What does _strremoveprefix() do?
_strremoveprefix() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/configurable.py.
Where is _strremoveprefix() defined?
_strremoveprefix() is defined in libs/core/langchain_core/runnables/configurable.py at line 641.
What calls _strremoveprefix()?
_strremoveprefix() is called by 1 function(s): _prepare.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free