Skip to content

Commit

Permalink
chore: self mutation
Browse files Browse the repository at this point in the history
Signed-off-by: monada-bot[bot] <[email protected]>
  • Loading branch information
monadabot committed Jul 29, 2023
1 parent 36d2ff8 commit 965ed77
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/docs/04-standard-library/02-std/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1574,6 +1574,7 @@ String.
| <code><a href="#@winglang/sdk.std.String.endsWith">endsWith</a></code> | Does this string end with the given searchString? |
| <code><a href="#@winglang/sdk.std.String.indexOf">indexOf</a></code> | Returns the index of the first occurrence of searchString found. |
| <code><a href="#@winglang/sdk.std.String.lowercase">lowercase</a></code> | Returns this string in lower case. |
| <code><a href="#@winglang/sdk.std.String.replace">replace</a></code> | Replaces occurrences of a substring within a string. |
| <code><a href="#@winglang/sdk.std.String.split">split</a></code> | Splits string by separator. |
| <code><a href="#@winglang/sdk.std.String.startsWith">startsWith</a></code> | Does this string start with the given searchString? |
| <code><a href="#@winglang/sdk.std.String.substring">substring</a></code> | Returns a string between indexStart, indexEnd. |
Expand Down Expand Up @@ -1670,6 +1671,30 @@ lowercase(): str

Returns this string in lower case.

##### `replace` <a name="replace" id="@winglang/sdk.std.String.replace"></a>

```wing
replace(searchString: str, replaceString: str): str
```

Replaces occurrences of a substring within a string.

###### `searchString`<sup>Required</sup> <a name="searchString" id="@winglang/sdk.std.String.replace.parameter.searchString"></a>

- *Type:* str

The substring to search for.

---

###### `replaceString`<sup>Required</sup> <a name="replaceString" id="@winglang/sdk.std.String.replace.parameter.replaceString"></a>

- *Type:* str

The replacement substring.

---

##### `split` <a name="split" id="@winglang/sdk.std.String.split"></a>

```wing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ source: libs/wingc/src/lsp/completions.rs
value: "```wing\nlowercase: (): str\n```\n---\nReturns this string in lower case.\n\n\n### Returns\na new lower case string."
sortText: ff|lowercase
insertText: lowercase()
- label: replace
kind: 2
detail: "(searchString: str, replaceString: str): str"
documentation:
kind: markdown
value: "```wing\nreplace: (searchString: str, replaceString: str): str\n```\n---\nReplaces occurrences of a substring within a string.\n\n\n### Returns\nThe modified string after replacement."
sortText: ff|replace
insertText: replace($0)
insertTextFormat: 2
command:
title: triggerParameterHints
command: editor.action.triggerParameterHints
- label: split
kind: 2
detail: "(separator: str): Array<str>"
Expand Down

0 comments on commit 965ed77

Please sign in to comment.