Skip to content

Commit

Permalink
add String>>#gtCharIndexAtByteOffset:
Browse files Browse the repository at this point in the history
  • Loading branch information
syrel committed Nov 28, 2024
1 parent 56ead9b commit 326ef62
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Bloc/ByteString.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Extension { #name : #ByteString }

{ #category : #'*Bloc' }
ByteString >> gtCharIndexAtByteOffset: anOffset [
^ anOffset + 1
]
6 changes: 6 additions & 0 deletions src/Bloc/ByteSymbol.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Extension { #name : #ByteSymbol }

{ #category : #'*Bloc' }
ByteSymbol >> gtCharIndexAtByteOffset: anOffset [
^ anOffset + 1
]
5 changes: 5 additions & 0 deletions src/Bloc/String.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ String >> asBlocElementId [

^ BlElementId named: self asSymbol
]

{ #category : #'*Bloc' }
String >> gtCharIndexAtByteOffset: anOffset [
^ self subclassResponsibility
]
8 changes: 8 additions & 0 deletions src/Bloc/WideString.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Extension { #name : #WideString }

{ #category : #'*Bloc' }
WideString >> gtCharIndexAtByteOffset: anOffset [
<primitive: 'primitiveWideStringByteIndexToCharIndex'>

^ self primitiveFail
]
8 changes: 8 additions & 0 deletions src/Bloc/WideSymbol.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Extension { #name : #WideSymbol }

{ #category : #'*Bloc' }
WideSymbol >> gtCharIndexAtByteOffset: anOffset [
<primitive: 'primitiveWideStringByteIndexToCharIndex'>

^ self primitiveFail
]

0 comments on commit 326ef62

Please sign in to comment.