Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5b65d2f

Browse files
authored
Merge pull request#4 from crlf0710/various_changes
Various changes
2 parents4a8cb11 +f0f956f commit5b65d2f

File tree

3 files changed

+1040
-968
lines changed

3 files changed

+1040
-968
lines changed

‎scripts/unicode.py‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@
1111
# except according to those terms.
1212

1313
# This script uses the following Unicode tables:
14-
# - DerivedCoreProperties.txt
15-
# - auxiliary/GraphemeBreakProperty.txt
16-
# - auxiliary/WordBreakProperty.txt
17-
# - ReadMe.txt
18-
# - UnicodeData.txt
14+
# - PropertyValueAliases.txt
15+
# - ScriptExtensions.txt
16+
# - Scripts.txt
1917
#
2018
# Since this should not require frequent updates, we just store this
2119
# out-of-line and check the unicode.rs file into git.
@@ -39,7 +37,7 @@
3937
use super::ScriptExtension;
4038
'''
4139

42-
UNICODE_VERSION= (12,0,0)
40+
UNICODE_VERSION= (13,0,0)
4341

4442
UNICODE_VERSION_NUMBER="%s.%s.%s"%UNICODE_VERSION
4543

‎src/lib.rs‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,15 @@ impl ScriptExtension {
193193
(self.first ==0)&(self.second ==0)&(self.third ==0)
194194
}
195195

196+
/// Returns the number of scripts in the script extension
197+
pubfnlen(self) ->usize{
198+
ifself.is_common_or_inherited(){
199+
1
200+
}else{
201+
(self.first.count_ones() +self.second.count_ones() +self.third.count_ones())asusize
202+
}
203+
}
204+
196205
/// Intersect this `ScriptExtension` with another `ScriptExtension`. Produces `Unknown` if things
197206
/// do not intersect. This is equivalent to [`ScriptExtension::intersection`] but it stores the result
198207
/// in `self`
@@ -257,9 +266,9 @@ impl ScriptExtension {
257266
ext
258267
}
259268

260-
/// Iterate over the scripts in thisstring
269+
/// Iterate over the scripts in thisscript extension
261270
///
262-
/// Will neveryeild Script::Unknown
271+
/// Will neveryield Script::Unknown
263272
pubfniter(self) ->ScriptIterator{
264273
ScriptIterator{ext:self}
265274
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp