mirror of
https://github.com/ipxe/ipxe
synced 2025-12-22 21:11:03 +03:00
[readline] Add replace_string()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -117,6 +117,17 @@ static void kill_eol ( struct edit_string *string ) {
|
||||
insert_delete ( string, ~( ( size_t ) 0 ), NULL );
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace editable string
|
||||
*
|
||||
* @v string Editable string
|
||||
* @v replacement Replacement string
|
||||
*/
|
||||
void replace_string ( struct edit_string *string, const char *replacement ) {
|
||||
string->cursor = 0;
|
||||
insert_delete ( string, ~( ( size_t ) 0 ), replacement );
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit editable string
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user