Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
- [Moving >, >=, <, <= to types where such operators make sense][14017]
- [Moving warning releated methods outside of `Any`][13978]
- [Moving error relelated methods outside of `Any`][14003]
- [Defining to_text & co. as extension methods](14050)
- [Register and `lookup_services` in package.yaml][11868]
- [Open type check `Type&Any` lets all visible types thru][13225]
- [Removal of --no-global-cache option][13909]
Expand All @@ -53,6 +54,7 @@
[14017]: https://github.com/enso-org/enso/pull/14017
[14003]: https://github.com/enso-org/enso/pull/14003
[13978]: https://github.com/enso-org/enso/pull/13978
[14050]: https://github.com/enso-org/enso/pull/14050
[11868]: https://github.com/enso-org/enso/pull/11868
[13225]: https://github.com/enso-org/enso/pull/13225
[13909]: https://github.com/enso-org/enso/pull/13909
Expand Down
3 changes: 0 additions & 3 deletions distribution/lib/Standard/Base/0.0.0-dev/docs/api/Any.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@
- if_nothing self ~other:Standard.Base.Any.Any -> Standard.Base.Any.Any
- is_nothing self -> Standard.Base.Any.Any
- map_nothing self f:Standard.Base.Any.Any -> Standard.Base.Any.Any
- pretty self -> Standard.Base.Any.Any
- to self target_type:Standard.Base.Any.Any -> Standard.Base.Any.Any
- to_display_text self -> Standard.Base.Any.Any
- to_text self -> Standard.Base.Any.Any
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Enso Signatures 1.0
## module Standard.Base.Data.Text.Extensions
- Standard.Base.Any.Any.pretty self -> Standard.Base.Any.Any
- Standard.Base.Any.Any.to_display_text self -> Standard.Base.Any.Any
- Standard.Base.Any.Any.to_text self -> Standard.Base.Any.Any
- Standard.Base.Data.Text.Text.* self count:Standard.Base.Data.Numbers.Integer -> Standard.Base.Any.Any
- Standard.Base.Data.Text.Text.at self index:Standard.Base.Data.Numbers.Integer= -> Standard.Base.Any.Any
- Standard.Base.Data.Text.Text.bytes self encoding:Standard.Base.Data.Text.Encoding.Encoding= on_problems:Standard.Base.Errors.Problem_Behavior.Problem_Behavior= -> Standard.Base.Any.Any
Expand Down Expand Up @@ -40,7 +43,7 @@
- Standard.Base.Data.Text.Text.parse_time_zone self -> Standard.Base.Any.Any
- Standard.Base.Data.Text.Text.repeat self count:Standard.Base.Data.Numbers.Integer= -> Standard.Base.Any.Any
- Standard.Base.Data.Text.Text.replace self term:(Standard.Base.Data.Text.Text|Standard.Base.Data.Text.Regex.Regex) replacement:Standard.Base.Data.Text.Text case_sensitivity:Standard.Base.Data.Text.Case_Sensitivity.Case_Sensitivity= only_first:Standard.Base.Data.Boolean.Boolean= -> Standard.Base.Any.Any
- Standard.Base.Data.Text.Text.reverse self -> Standard.Base.Any.Any
- Standard.Base.Data.Text.Text.reverse self -> Standard.Base.Data.Text.Text
- Standard.Base.Data.Text.Text.second self -> Standard.Base.Any.Any
- Standard.Base.Data.Text.Text.split self delimiter:Standard.Base.Any.Any= case_sensitivity:Standard.Base.Data.Text.Case_Sensitivity.Case_Sensitivity= use_regex:Standard.Base.Any.Any= -> Standard.Base.Any.Any
- Standard.Base.Data.Text.Text.starts_with self prefix:Standard.Base.Data.Text.Text case_sensitivity:Standard.Base.Data.Text.Case_Sensitivity.Case_Sensitivity= -> Standard.Base.Any.Any
Expand Down
61 changes: 0 additions & 61 deletions distribution/lib/Standard/Base/0.0.0-dev/src/Any.enso
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import project.Data.Text.Text
import project.Meta
import project.Nothing.Nothing
from project.Data.Boolean import Boolean, False, True
Expand Down Expand Up @@ -64,66 +63,6 @@ type Any
to : Any -> Any ! No_Such_Conversion
to self target_type = target_type.from self ...

## ---
group: Conversions
icon: text
---
Generic conversion of an arbitrary Enso value to a corresponding textual
representation.

## Examples
### Getting a textual representation of the number 7.

```
7.to_text
```
to_text : Text
to_text self = @Builtin_Method "Any.to_text"

## ---
group: convert
icon: enso_logo
---
Convert the value to a corresponding Enso code representation.

## Examples
### Getting the Enso code of the number 7.

```
7.pretty
```

Returns a Text

7

### Getting the Enso code of the text Hello World!.

```
"Hello World!".pretty
```

Returns a Text

'Hello World!'
pretty : Text
pretty self = @Builtin_Method "Any.pretty"

## ---
private: true
---
Generic conversion of an arbitrary Enso value to a corresponding short
human-readable representation.

## Examples
### Getting a short human-readable textual representation of the number 7.

```
7.to_display_text
```
to_display_text : Text
to_display_text self = @Builtin_Method "Any.to_display_text"

## ---
aliases: [equals]
group: Operators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,63 @@ polyglot java import org.enso.base.text.Utf16Span
polyglot java import org.enso.base.Text_Utils
polyglot java import org.enso.base.WithProblems

## ---
group: Conversions
icon: text
---
Generic conversion of an arbitrary Enso value to a corresponding textual
representation.

## Examples
### Getting a textual representation of the number 7.

```
7.to_text
```
Any.to_text self -> Text = @Builtin_Method "Any.to_text"

## ---
group: convert
icon: enso_logo
---
Convert the value to a corresponding Enso code representation.

## Examples
### Getting the Enso code of the number 7.

```
7.pretty
```

Returns a Text

7

### Getting the Enso code of the text Hello World!.

```
"Hello World!".pretty
```

Returns a Text

'Hello World!'
Any.pretty self -> Text = @Builtin_Method "Any.pretty"

## ---
private: true
---
Generic conversion of an arbitrary Enso value to a corresponding short
human-readable representation.

## Examples
### Getting a short human-readable textual representation of the number 7.

```
7.to_display_text
```
Any.to_display_text self -> Text = @Builtin_Method "Any.to_display_text"

## ---
group: Text
icon: text
Expand All @@ -76,8 +133,7 @@ polyglot java import org.enso.base.WithProblems
A character is defined as an Extended Grapheme Cluster, see Unicode Standard
Annex 29. This is the smallest unit that still has semantic meaning in most
text-processing applications.
Text.reverse : Text
Text.reverse self =
Text.reverse self -> Text =
reverseStringBuilder = StringBuilder.new self.length
iterator = BreakIterator.getCharacterInstance
iterator.setText self
Expand Down
Loading