Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ZeroX-DG/vi-rs
/ functions
Functions
113 in github.com/ZeroX-DG/vi-rs
⨍
Functions
113
◇
Types & classes
10
↓ 75 callers
Method
push
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 callers
Function
transform_buffer
(buffer: I, output: &mut String)
src/vni.rs:14
↓ 20 callers
Function
transform_buffer_incremental
(definition: &Definition)
src/methods.rs:632
↓ 16 callers
Method
is_empty
(&self)
src/methods.rs:575
↓ 14 callers
Method
clear
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 callers
Function
clean_char
(ch: char)
src/util.rs:18
↓ 10 callers
Method
len
(&self)
src/methods.rs:598
↓ 9 callers
Function
get_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 callers
Method
view
(&self)
src/methods.rs:470
↓ 4 callers
Method
is_empty
(&self)
src/syllable.rs:114
↓ 4 callers
Function
parse_syllable
(input: &str)
src/parsing.rs:39
↓ 4 callers
Function
parse_vowel
(input: &str)
src/parsing.rs:33
↓ 3 callers
Function
modify_letter
(syllable: &mut Syllable, modification: &LetterModification)
src/processor.rs:127
↓ 3 callers
Function
replace_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 callers
Method
set
Set a new value for the current syllable. This will parse the value into consonants, vowel, tonemark & modifications.
src/syllable.rs:161
↓ 3 callers
Function
transform_buffer_incremental_with_style
( definition: &Definition, accent_style: AccentStyle, )
src/methods.rs:654
↓ 2 callers
Function
apply_tone
Applies a tone mark to the correct vowel in a syllable.
src/bin/vietnamese_generator.rs:82
↓ 2 callers
Method
contains_modification
Indicate whether a modification exist in the syllable
src/syllable.rs:180
↓ 2 callers
Function
get_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 callers
Function
get_toned_vowels
Returns a matrix of all Vietnamese vowels, organized by tone.
src/bin/vn2ime.rs:148
↓ 2 callers
Function
initial_consonant
(input: &str)
src/parsing.rs:22
↓ 2 callers
Function
transform_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 callers
Function
transform_lines
(input: &str, transformer: F)
tests/shared.rs:26
↓ 2 callers
Method
update_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 callers
Function
vowel
(input: &str)
src/parsing.rs:29
↓ 1 callers
Function
add_modification_char
Add modification to input character. Return a modified character.
src/editing.rs:114
↓ 1 callers
Function
add_tone
(syllable: &mut Syllable, tone_mark: &ToneMark)
src/processor.rs:90
↓ 1 callers
Function
add_tone_char
Add tone mark to input character. Return a new char with the tone mark.
src/editing.rs:101
↓ 1 callers
Function
convert_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 callers
Function
extract_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 callers
Function
extract_tone
Extract a tone mark from an input string. There can only be one tone mark.
src/parsing.rs:78
↓ 1 callers
Function
extract_tone_char
Extract a tone mark from an input char.
src/parsing.rs:89
↓ 1 callers
Function
generate_telex_map
Generates the complete character-to-keystroke map for the Telex input method.
src/bin/vn2ime.rs:70
↓ 1 callers
Function
generate_vni_map
Generates the complete character-to-keystroke map for the VNI input method.
src/bin/vn2ime.rs:109
↓ 1 callers
Function
get_initials
()
src/bin/vietnamese_generator.rs:136
↓ 1 callers
Function
get_rhymes
(UPDATED)** Returns a comprehensive list of Vietnamese rhymes (vần), generated from the user-provided table.
src/bin/vietnamese_generator.rs:145
↓ 1 callers
Function
get_tone_map
Returns a map from a base vowel to its 6 toned forms.
src/bin/vietnamese_generator.rs:169
↓ 1 callers
Function
is_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 callers
Function
is_valid_final_consonant
(consonant: &str)
src/validation.rs:84
↓ 1 callers
Function
is_valid_initial_consonant
(consonant: &str)
src/validation.rs:64
↓ 1 callers
Function
is_valid_syllable
Verify if a syllable is a valid vietnamese syllable.
src/validation.rs:31
↓ 1 callers
Method
recalculate_modifications
Recalculate the position of the modification for the current syllable.
src/syllable.rs:135
↓ 1 callers
Function
remove_tone
Remove the tone for the letter
src/processor.rs:247
↓ 1 callers
Method
replace_last_char
Replace the last character in the string to some other character.
src/syllable.rs:172
↓ 1 callers
Method
result
(&self)
src/methods.rs:497
Function
benchmark_all_telex_txt
(c: &mut Criterion)
benches/all_syllables_benchmark.rs:4
Function
benchmark_all_vni_txt
(c: &mut Criterion)
benches/all_syllables_benchmark.rs:23
Function
benchmark_clean_char_const_evaluation
(c: &mut Criterion)
benches/clean_char_benchmark.rs:55
Function
benchmark_clean_char_mixed_text
(c: &mut Criterion)
benches/clean_char_benchmark.rs:43
Function
benchmark_clean_char_non_vietnamese_chars
(c: &mut Criterion)
benches/clean_char_benchmark.rs:26
Function
benchmark_clean_char_vietnamese_chars
(c: &mut Criterion)
benches/clean_char_benchmark.rs:5
Method
fmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/syllable.rs:188
Method
from
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
Function
get_tone_mark_placement_mid_not_end
()
src/editing.rs:218
Function
get_tone_mark_placement_normal
()
src/editing.rs:204
Function
get_tone_mark_placement_old
()
src/editing.rs:197
Function
get_tone_mark_placement_special
()
src/editing.rs:211
Function
get_tone_mark_placement_u_and_o
()
src/editing.rs:225
Function
get_tone_mark_placement_uppercase
()
src/editing.rs:232
Function
get_vowel_double_start_tone
()
src/parsing.rs:127
Function
get_vowel_double_start_tone_2
()
src/parsing.rs:134
Function
get_vowel_empty
()
src/parsing.rs:120
Function
get_vowel_normal
()
src/parsing.rs:113
Function
incremental_character_by_character
(c: &mut Criterion)
benches/incremental_benchmark.rs:49
Function
incremental_long_input
(c: &mut Criterion)
benches/incremental_benchmark.rs:85
Function
incremental_memory_efficiency
(c: &mut Criterion)
benches/incremental_benchmark.rs:107
Function
incremental_reuse_buffer
(c: &mut Criterion)
benches/incremental_benchmark.rs:66
Function
incremental_vs_batch_telex
(c: &mut Criterion)
benches/incremental_benchmark.rs:5
Function
incremental_vs_batch_vni
(c: &mut Criterion)
benches/incremental_benchmark.rs:27
Method
input
(&self)
src/methods.rs:519
Function
is_vowel
(c: char)
src/util.rs:81
Method
len
(&self)
src/syllable.rs:94
Function
main
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
Function
main
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
Function
main
()
examples/old_style.rs:1
Function
main
()
examples/long.rs:3
Function
main
()
examples/telex.rs:1
Function
main
()
examples/vni.rs:1
Function
main
()
examples/custom_definition.rs:22
Function
main
A REPL for testing transformation result.
examples/repl.rs:4
Function
main
()
examples/simple.rs:1
Function
main
()
examples/incremental.rs:4
Method
new
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
Method
new
(definition: &'def Definition)
src/methods.rs:297
Method
new_with_style
(definition: &'def Definition, accent_style: AccentStyle)
src/methods.rs:313
Method
push
Push a character to the syllable. This will also trigger modification recalculation for the syllable.
src/syllable.rs:121
Function
snapshot_transform
(lines: &str)
tests/telex.rs:3
Function
snapshot_transform
(lines: &str)
tests/vni.rs:3
Function
telex_benchmark
(c: &mut Criterion)
benches/transform_benchmark.rs:4
Function
test_clean_char_a_family
()
src/util.rs:236
Function
test_clean_char_const_fn
()
src/util.rs:493
Function
test_clean_char_d_family
()
src/util.rs:279
Function
test_clean_char_e_family
()
src/util.rs:290
Function
test_clean_char_i_family
()
src/util.rs:321
Function
test_clean_char_non_vietnamese
()
src/util.rs:433
Function
test_clean_char_o_family
()
src/util.rs:340
Function
test_clean_char_special_characters
()
src/util.rs:476
Function
test_clean_char_u_family
()
src/util.rs:383
Function
test_clean_char_y_family
()
src/util.rs:414
Function
test_incremental_buffer_accent_style
()
tests/incremental.rs:151
next →
1–100 of 113, ranked by callers