@@ -209,13 +209,15 @@ For example, NFKC corresponds to the options `compose=true, compat=true, stable=
209
209
210
210
# Examples
211
211
```jldoctest
212
- julia> "μ" == normalize("µ", compat=true) #LHS: Unicode U+03bc, RHS: Unicode U+00b5
212
+ julia> using Unicode
213
+
214
+ julia> "μ" == Unicode.normalize("µ", compat=true) #LHS: Unicode U+03bc, RHS: Unicode U+00b5
213
215
true
214
216
215
- julia> normalize("JuLiA", casefold=true)
217
+ julia> Unicode. normalize("JuLiA", casefold=true)
216
218
"julia"
217
219
218
- julia> normalize("JúLiA", stripmark=true)
220
+ julia> Unicode. normalize("JúLiA", stripmark=true)
219
221
"JuLiA"
220
222
```
221
223
"""
@@ -239,6 +241,8 @@ Give the number of columns needed to print a character.
239
241
240
242
# Examples
241
243
```jldoctest
244
+ julia> using Unicode
245
+
242
246
julia> textwidth('α')
243
247
1
244
248
@@ -255,6 +259,8 @@ Give the number of columns needed to print a string.
255
259
256
260
# Examples
257
261
```jldoctest
262
+ julia> using Unicode
263
+
258
264
julia> textwidth("March")
259
265
5
260
266
```
@@ -281,6 +287,8 @@ Returns `true` if the given char or integer is an assigned Unicode code point.
281
287
282
288
# Examples
283
289
```jldoctest
290
+ julia> using Unicode
291
+
284
292
julia> isassigned(101)
285
293
true
286
294
@@ -301,6 +309,8 @@ Letter: Lowercase.
301
309
302
310
# Examples
303
311
```jldoctest
312
+ julia> using Unicode
313
+
304
314
julia> islower('α')
305
315
true
306
316
@@ -324,6 +334,8 @@ Letter: Uppercase, or Lt, Letter: Titlecase.
324
334
325
335
# Examples
326
336
```jldoctest
337
+ julia> using Unicode
338
+
327
339
julia> isupper('γ')
328
340
false
329
341
@@ -346,6 +358,8 @@ Tests whether a character is a decimal digit (0-9).
346
358
347
359
# Examples
348
360
```jldoctest
361
+ julia> using Unicode
362
+
349
363
julia> isdigit('❤')
350
364
false
351
365
@@ -367,6 +381,8 @@ category Letter, i.e. a character whose category code begins with 'L'.
367
381
368
382
# Examples
369
383
```jldoctest
384
+ julia> using Unicode
385
+
370
386
julia> isalpha('❤')
371
387
false
372
388
@@ -391,6 +407,8 @@ Use [`isdigit`](@ref) to check whether a character a decimal digit between 0 and
391
407
392
408
# Examples
393
409
```jldoctest
410
+ julia> using Unicode
411
+
394
412
julia> isnumeric('௰')
395
413
true
396
414
@@ -415,6 +433,8 @@ category Letter or Number, i.e. a character whose category code begins with 'L'
415
433
416
434
# Examples
417
435
```jldoctest
436
+ julia> using Unicode
437
+
418
438
julia> isalnum('❤')
419
439
false
420
440
@@ -441,6 +461,8 @@ Control characters are the non-printing characters of the Latin-1 subset of Unic
441
461
442
462
# Examples
443
463
```jldoctest
464
+ julia> using Unicode
465
+
444
466
julia> iscntrl('\\ x01')
445
467
true
446
468
@@ -458,6 +480,8 @@ character whose category code begins with 'P'.
458
480
459
481
# Examples
460
482
```jldoctest
483
+ julia> using Unicode
484
+
461
485
julia> ispunct('α')
462
486
false
463
487
@@ -481,6 +505,8 @@ category Zs.
481
505
482
506
# Examples
483
507
```jldoctest
508
+ julia> using Unicode
509
+
484
510
julia> isspace('\\ n')
485
511
true
486
512
@@ -503,6 +529,8 @@ Tests whether a character is printable, including spaces, but not a control char
503
529
504
530
# Examples
505
531
```jldoctest
532
+ julia> using Unicode
533
+
506
534
julia> isprint('\\ x01')
507
535
false
508
536
@@ -523,6 +551,8 @@ classified with `isgraph(c)==true`.
523
551
524
552
# Examples
525
553
```jldoctest
554
+ julia> using Unicode
555
+
526
556
julia> isgraph('\\ x01')
527
557
false
528
558
@@ -540,6 +570,8 @@ all elements of a string.
540
570
541
571
# Examples
542
572
```jldoctest
573
+ julia> using Unicode
574
+
543
575
julia> isascii('a')
544
576
true
545
577
@@ -564,6 +596,8 @@ include `x` (as in the standard `0x` prefix).
564
596
565
597
# Examples
566
598
```jldoctest
599
+ julia> using Unicode
600
+
567
601
julia> isxdigit('a')
568
602
true
569
603
@@ -582,6 +616,8 @@ Return `s` with all characters converted to uppercase.
582
616
583
617
# Examples
584
618
```jldoctest
619
+ julia> using Unicode
620
+
585
621
julia> uppercase("Julia")
586
622
"JULIA"
587
623
```
@@ -595,6 +631,8 @@ Return `s` with all characters converted to lowercase.
595
631
596
632
# Examples
597
633
```jldoctest
634
+ julia> using Unicode
635
+
598
636
julia> lowercase("STRINGS AND THINGS")
599
637
"strings and things"
600
638
```
@@ -610,6 +648,8 @@ character in `s`.
610
648
611
649
# Examples
612
650
```jldoctest
651
+ julia> using Unicode
652
+
613
653
julia> titlecase("the julia programming language")
614
654
"The Julia Programming Language"
615
655
```
@@ -639,6 +679,8 @@ every word in `s`.
639
679
640
680
# Examples
641
681
```jldoctest
682
+ julia> using Unicode
683
+
642
684
julia> ucfirst("python")
643
685
"Python"
644
686
```
@@ -657,6 +699,8 @@ Return `string` with the first character converted to lowercase.
657
699
658
700
# Examples
659
701
```jldoctest
702
+ julia> using Unicode
703
+
660
704
julia> lcfirst("Julia")
661
705
"julia"
662
706
```
0 commit comments