Skip to content

Commit dd51abc

Browse files
committed
Rename anyGrapheme -> anyGraphemeCluster
Update to match the proposal.
1 parent 45183b6 commit dd51abc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Sources/RegexBuilder/CharacterClass.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ extension RegexComponent where Self == CharacterClass {
4848
.init(DSLTree.CustomCharacterClass(members: [.atom(.any)]))
4949
}
5050

51-
public static var anyGrapheme: CharacterClass {
51+
public static var anyGraphemeCluster: CharacterClass {
5252
.init(unconverted: .anyGrapheme)
5353
}
5454

Tests/RegexBuilderTests/AlgorithmsTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ class AlgorithmsResultBuilderTests: XCTestCase {
260260
func testStartsAndContains() throws {
261261
let fam = "👨‍👩‍👧‍👦👨‍👨‍👧‍👧 we Ⓡ family"
262262
let startsWithGrapheme = fam.starts {
263-
OneOrMore(.anyGrapheme)
263+
OneOrMore(.anyGraphemeCluster)
264264
OneOrMore(.whitespace)
265265
}
266266
XCTAssertEqual(startsWithGrapheme, true)
@@ -272,7 +272,7 @@ class AlgorithmsResultBuilderTests: XCTestCase {
272272

273273
let content = {
274274
Regex {
275-
OneOrMore(.anyGrapheme)
275+
OneOrMore(.anyGraphemeCluster)
276276
OneOrMore(.whitespace)
277277
}
278278
}
@@ -321,7 +321,7 @@ class AlgorithmsResultBuilderTests: XCTestCase {
321321

322322
var mutable = "👨‍👩‍👧‍👦 we Ⓡ family"
323323
mutable.trimPrefix {
324-
.anyGrapheme
324+
.anyGraphemeCluster
325325
ZeroOrMore(.whitespace)
326326
}
327327
XCTAssertEqual(mutable, "we Ⓡ family")

0 commit comments

Comments
 (0)