Skip to content

Commit d44a176

Browse files
committed
Rename anyGrapheme -> anyGraphemeCluster
Update to match the proposal.
1 parent 3458383 commit d44a176

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
@@ -259,7 +259,7 @@ class AlgorithmsResultBuilderTests: XCTestCase {
259259
func testStartsAndContains() throws {
260260
let fam = "👨‍👩‍👧‍👦👨‍👨‍👧‍👧 we Ⓡ family"
261261
let startsWithGrapheme = fam.starts {
262-
OneOrMore(.anyGrapheme)
262+
OneOrMore(.anyGraphemeCluster)
263263
OneOrMore(.whitespace)
264264
}
265265
XCTAssertEqual(startsWithGrapheme, true)
@@ -271,7 +271,7 @@ class AlgorithmsResultBuilderTests: XCTestCase {
271271

272272
let content = {
273273
Regex {
274-
OneOrMore(.anyGrapheme)
274+
OneOrMore(.anyGraphemeCluster)
275275
OneOrMore(.whitespace)
276276
}
277277
}
@@ -320,7 +320,7 @@ class AlgorithmsResultBuilderTests: XCTestCase {
320320

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

0 commit comments

Comments
 (0)