stripV
Strip the leading “v” from a version string if it exists.
Available since v1.9.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
version | string | The version string to process |
Returns
Section titled “Returns”string — The version string without leading “v”, or the original value if it’s not a string or doesn’t start with “v”
Examples
Section titled “Examples”Remove v prefix from a version string
Section titled “Remove v prefix from a version string”Strips the leading “v” from a git tag-style version string.
No-op when there is no v prefix
Section titled “No-op when there is no v prefix”Returns the string unchanged when it does not start with “v”.
