diff --git a/docs/reference/text/to-string.md b/docs/reference/text/convert-to-text.md similarity index 57% rename from docs/reference/text/to-string.md rename to docs/reference/text/convert-to-text.md index 5377b1a0..b95edccd 100644 --- a/docs/reference/text/to-string.md +++ b/docs/reference/text/convert-to-text.md @@ -1,7 +1,7 @@ -# to string +# convert to text Converts a value into a text representation. ```sig -toString(123) +convertToText(123) ``` \ No newline at end of file diff --git a/libs/core/control.ts b/libs/core/control.ts index a0403cb7..d8dcf036 100644 --- a/libs/core/control.ts +++ b/libs/core/control.ts @@ -55,12 +55,12 @@ namespace control { } /** - * Convert any value to a string - * @param value value to be converted to a string + * Convert any value to text + * @param value value to be converted to text */ -//% help=text/to-string weight=1 -//% block="convert $value=variables_get(myValue) to string" -//% blockId=variable_to_string blockNamespace="text" -function toString(value: any): string { +//% help=text/convert-to-text weight=1 +//% block="convert $value=math_number to text" +//% blockId=variable_to_text blockNamespace="text" +function convertToText(value: any): string { return "" + value; } \ No newline at end of file