-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
CoreUpdates/6880-String-Character-classComments-JuanVuletich-2024Dec01-11h28m-jmv.001.cs.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'From Cuis7.1 [latest update: #6879] on 1 December 2024 at 11:30:23 am'! | ||
|
||
!String commentStamp: 'jmv 12/1/2024 11:28:03' prior: 0! | ||
A String is an indexed collection of Characters. In Cuis, Characters are Unicode Characters, each one associated with a numerical Unicode Code Point. In instances of String, all the Characters must be in the two Unicode blocks ("Basic Latin" and "Latin-1 Supplement", meaning the code point is <= 255. | ||
See also UnicodeString, that doesn't have this limitation. | ||
String support a vast array of useful methods, which can best be learned by browsing and trying out examples as you find them in the code. | ||
Here are a few useful methods to look at... | ||
String match: | ||
String contractTo: | ||
String also inherits many useful methods from its hierarchy, such as | ||
SequenceableCollection , | ||
SequenceableCollection copyReplaceAll:with: | ||
See UnicodeString.! | ||
!Character commentStamp: '<historical>' prior: 0! | ||
I represent elements in a writing system. In Cuis, instances of Characters are Unicode Characters, each one associated with a numerical Unicode Code Point. | ||
Characters are the elements of the CharacterSequence hierarchy, including String and UnicodeString.! | ||
12 changes: 12 additions & 0 deletions
12
CoreUpdates/6881-codePoint-comment-JuanVuletich-2024Dec01-11h32m-jmv.001.cs.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'From Cuis7.1 [latest update: #6880] on 1 December 2024 at 11:33:12 am'! | ||
|
||
!Character methodsFor: 'accessing' stamp: 'jmv 12/1/2024 11:32:58'! | ||
codePoint | ||
"Code points are the numbers assigned by the Unicode Consortium to every character in every writing system." | ||
" | ||
self assert: $A codePoint hex = '16r41'. | ||
self assert: $€ codePoint hex = '16r20AC'. | ||
" | ||
<primitive: 171> | ||
^self primitiveFailed! ! | ||
|