MCPcopy Create free account

hub / github.com/ZeroX-DG/vi-rs / functions

Functions113 in github.com/ZeroX-DG/vi-rs

↓ 75 callersMethodpush
Adds a character to the buffer and updates the transformation result. Returns the transformation result for this character addition. # Panics Panic
src/methods.rs:345
↓ 27 callersFunctiontransform_buffer
(buffer: I, output: &mut String)
src/vni.rs:14
↓ 20 callersFunctiontransform_buffer_incremental
(definition: &Definition)
src/methods.rs:632
↓ 16 callersMethodis_empty
(&self)
src/methods.rs:575
↓ 14 callersMethodclear
Clears the buffer, resetting it to an empty state. This removes all input characters, resets the syllable state, and clears the output and transforma
src/methods.rs:545
↓ 11 callersFunctionclean_char
(ch: char)
src/util.rs:18
↓ 10 callersMethodlen
(&self)
src/methods.rs:598
↓ 9 callersFunctionget_tone_mark_placement
Get nth character to place tone mark # Rules: 1. If a vowel contains ơ or ê, tone mark goes there 2. If a vowel contains `oa`, `oe`, `oo`, `oy`, tone
src/editing.rs:30
↓ 9 callersMethodview
(&self)
src/methods.rs:470
↓ 4 callersMethodis_empty
(&self)
src/syllable.rs:114
↓ 4 callersFunctionparse_syllable
(input: &str)
src/parsing.rs:39
↓ 4 callersFunctionparse_vowel
(input: &str)
src/parsing.rs:33
↓ 3 callersFunctionmodify_letter
(syllable: &mut Syllable, modification: &LetterModification)
src/processor.rs:127
↓ 3 callersFunctionreplace_nth_char
Replace a character at an index in an input char. Note: It's character index, not byte index.
src/editing.rs:85
↓ 3 callersMethodset
Set a new value for the current syllable. This will parse the value into consonants, vowel, tonemark & modifications.
src/syllable.rs:161
↓ 3 callersFunctiontransform_buffer_incremental_with_style
( definition: &Definition, accent_style: AccentStyle, )
src/methods.rs:654
↓ 2 callersFunctionapply_tone
Applies a tone mark to the correct vowel in a syllable.
src/bin/vietnamese_generator.rs:82
↓ 2 callersMethodcontains_modification
Indicate whether a modification exist in the syllable
src/syllable.rs:180
↓ 2 callersFunctionget_modification_positions
Get index of the characters to modify # Rules: 1. If the modification is Dyet, it's always the first letter. 2. If the modification is Circumflex, it
src/editing.rs:135
↓ 2 callersFunctionget_toned_vowels
Returns a matrix of all Vietnamese vowels, organized by tone.
src/bin/vn2ime.rs:148
↓ 2 callersFunctioninitial_consonant
(input: &str)
src/parsing.rs:22
↓ 2 callersFunctiontransform_buffer_with_style
Transforms a buffer of characters using a typing method definition with a given accent style. This is the customizable version of [`transform_buffer`
src/methods.rs:193
↓ 2 callersFunctiontransform_lines
(input: &str, transformer: F)
tests/shared.rs:26
↓ 2 callersMethodupdate_output
Updates the cached output string from the current syllable state. This is called internally after each transformation to maintain the cached output f
src/methods.rs:606
↓ 2 callersFunctionvowel
(input: &str)
src/parsing.rs:29
↓ 1 callersFunctionadd_modification_char
Add modification to input character. Return a modified character.
src/editing.rs:114
↓ 1 callersFunctionadd_tone
(syllable: &mut Syllable, tone_mark: &ToneMark)
src/processor.rs:90
↓ 1 callersFunctionadd_tone_char
Add tone mark to input character. Return a new char with the tone mark.
src/editing.rs:101
↓ 1 callersFunctionconvert_syllable
Converts an input string into a sequence of keystrokes using a provided mapping table. Non-Vietnamese characters are passed through unchanged.
src/bin/vn2ime.rs:54
↓ 1 callersFunctionextract_letter_modifications
Extract letter modifications from an input string. Note: In some cases, there might be more than 1 modification. E.g đươc has 3 modifications.
src/parsing.rs:55
↓ 1 callersFunctionextract_tone
Extract a tone mark from an input string. There can only be one tone mark.
src/parsing.rs:78
↓ 1 callersFunctionextract_tone_char
Extract a tone mark from an input char.
src/parsing.rs:89
↓ 1 callersFunctiongenerate_telex_map
Generates the complete character-to-keystroke map for the Telex input method.
src/bin/vn2ime.rs:70
↓ 1 callersFunctiongenerate_vni_map
Generates the complete character-to-keystroke map for the VNI input method.
src/bin/vn2ime.rs:109
↓ 1 callersFunctionget_initials
()
src/bin/vietnamese_generator.rs:136
↓ 1 callersFunctionget_rhymes
(UPDATED)** Returns a comprehensive list of Vietnamese rhymes (vần), generated from the user-provided table.
src/bin/vietnamese_generator.rs:145
↓ 1 callersFunctionget_tone_map
Returns a map from a base vowel to its 6 toned forms.
src/bin/vietnamese_generator.rs:169
↓ 1 callersFunctionis_valid_combination
Checks if an initial consonant can legally precede a rhyme. This enforces fundamental Vietnamese orthographic rules.
src/bin/vietnamese_generator.rs:63
↓ 1 callersFunctionis_valid_final_consonant
(consonant: &str)
src/validation.rs:84
↓ 1 callersFunctionis_valid_initial_consonant
(consonant: &str)
src/validation.rs:64
↓ 1 callersFunctionis_valid_syllable
Verify if a syllable is a valid vietnamese syllable.
src/validation.rs:31
↓ 1 callersMethodrecalculate_modifications
Recalculate the position of the modification for the current syllable.
src/syllable.rs:135
↓ 1 callersFunctionremove_tone
Remove the tone for the letter
src/processor.rs:247
↓ 1 callersMethodreplace_last_char
Replace the last character in the string to some other character.
src/syllable.rs:172
↓ 1 callersMethodresult
(&self)
src/methods.rs:497
Functionbenchmark_all_telex_txt
(c: &mut Criterion)
benches/all_syllables_benchmark.rs:4
Functionbenchmark_all_vni_txt
(c: &mut Criterion)
benches/all_syllables_benchmark.rs:23
Functionbenchmark_clean_char_const_evaluation
(c: &mut Criterion)
benches/clean_char_benchmark.rs:55
Functionbenchmark_clean_char_mixed_text
(c: &mut Criterion)
benches/clean_char_benchmark.rs:43
Functionbenchmark_clean_char_non_vietnamese_chars
(c: &mut Criterion)
benches/clean_char_benchmark.rs:26
Functionbenchmark_clean_char_vietnamese_chars
(c: &mut Criterion)
benches/clean_char_benchmark.rs:5
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/syllable.rs:188
Methodfrom
Creates a syllable from a string slice. # Examples ``` use vi::Syllable; let syllable: Syllable = "việt".into(); assert_eq!(syllable.to_string(), "
src/syllable.rs:223
Functionget_tone_mark_placement_mid_not_end
()
src/editing.rs:218
Functionget_tone_mark_placement_normal
()
src/editing.rs:204
Functionget_tone_mark_placement_old
()
src/editing.rs:197
Functionget_tone_mark_placement_special
()
src/editing.rs:211
Functionget_tone_mark_placement_u_and_o
()
src/editing.rs:225
Functionget_tone_mark_placement_uppercase
()
src/editing.rs:232
Functionget_vowel_double_start_tone
()
src/parsing.rs:127
Functionget_vowel_double_start_tone_2
()
src/parsing.rs:134
Functionget_vowel_empty
()
src/parsing.rs:120
Functionget_vowel_normal
()
src/parsing.rs:113
Functionincremental_character_by_character
(c: &mut Criterion)
benches/incremental_benchmark.rs:49
Functionincremental_long_input
(c: &mut Criterion)
benches/incremental_benchmark.rs:85
Functionincremental_memory_efficiency
(c: &mut Criterion)
benches/incremental_benchmark.rs:107
Functionincremental_reuse_buffer
(c: &mut Criterion)
benches/incremental_benchmark.rs:66
Functionincremental_vs_batch_telex
(c: &mut Criterion)
benches/incremental_benchmark.rs:5
Functionincremental_vs_batch_vni
(c: &mut Criterion)
benches/incremental_benchmark.rs:27
Methodinput
(&self)
src/methods.rs:519
Functionis_vowel
(c: char)
src/util.rs:81
Methodlen
(&self)
src/syllable.rs:94
Functionmain
Generates all valid Vietnamese syllables based on phonological and orthographic rules. The program combines initials, rhymes, and tones according to a
src/bin/vietnamese_generator.rs:6
Functionmain
Convert Vietnamese words into its ime presentation, supports Telex/VNI. Main function to run the converter as a command-line tool. It parses the comma
src/bin/vn2ime.rs:10
Functionmain
()
examples/old_style.rs:1
Functionmain
()
examples/long.rs:3
Functionmain
()
examples/telex.rs:1
Functionmain
()
examples/vni.rs:1
Functionmain
()
examples/custom_definition.rs:22
Functionmain
A REPL for testing transformation result.
examples/repl.rs:4
Functionmain
()
examples/simple.rs:1
Functionmain
()
examples/incremental.rs:4
Methodnew
Creates a new syllable from a string. # Examples ``` use vi::Syllable; let syllable = Syllable::new("hello"); assert_eq!(syllable.to_string(), "hel
src/syllable.rs:77
Methodnew
(definition: &'def Definition)
src/methods.rs:297
Methodnew_with_style
(definition: &'def Definition, accent_style: AccentStyle)
src/methods.rs:313
Methodpush
Push a character to the syllable. This will also trigger modification recalculation for the syllable.
src/syllable.rs:121
Functionsnapshot_transform
(lines: &str)
tests/telex.rs:3
Functionsnapshot_transform
(lines: &str)
tests/vni.rs:3
Functiontelex_benchmark
(c: &mut Criterion)
benches/transform_benchmark.rs:4
Functiontest_clean_char_a_family
()
src/util.rs:236
Functiontest_clean_char_const_fn
()
src/util.rs:493
Functiontest_clean_char_d_family
()
src/util.rs:279
Functiontest_clean_char_e_family
()
src/util.rs:290
Functiontest_clean_char_i_family
()
src/util.rs:321
Functiontest_clean_char_non_vietnamese
()
src/util.rs:433
Functiontest_clean_char_o_family
()
src/util.rs:340
Functiontest_clean_char_special_characters
()
src/util.rs:476
Functiontest_clean_char_u_family
()
src/util.rs:383
Functiontest_clean_char_y_family
()
src/util.rs:414
Functiontest_incremental_buffer_accent_style
()
tests/incremental.rs:151
next →1–100 of 113, ranked by callers