![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
![]() |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
|
|
#1
|
|||
|
|||
|
Código:
ListBox1.Items.LoadFromFile(mifichero); |
|
#2
|
||||
|
||||
|
Cita:
// Saludos |
|
#3
|
|||
|
|||
|
existe la funcion:
StringReplace() que reemplaza caracteres, y funciona bien excepto con el caracter nulo (Char(0)) |
|
#4
|
||||
|
||||
|
Cita:
// Saludos |
|
#5
|
|||
|
|||
|
Exacto, el problema está porque son cadenas separadas por #0 y no por #10+#13. Pensé que quizas, leyendo todo a una cadena, y usando Pos(#0,buffer), seguido de un copy (para extraer la linea) y un delete (para borrar del buffer la linea que ya separé) podria hacerlo facilmente, el codigo quedaría digamos... tan solo un poco mas bonito, pero estaría recorriendo la cadena tres veces tan sólo para extraer una linea!
![]() |
|
#6
|
||||
|
||||
|
No se si te servirá esto:
Código:
Converts a list of null terminated strings to a string list. procedure MultiSzToStrings(const Dest: TStrings; const Source: PChar); Unit JclStrings Parameters const Dest: TStrings The string list to receive the individual strings. const Source: PChar The source string to extract the items from. Description Source is assumed to be a list of strings, separated by a NULL character, terminated by a double NULL character. For example 'Project#0JEDI#0Rules#0#0'. The function takes this string and copies the individual strings to the string list. Thus, after executing this function with the above string the Dest list will contain the items 'Project', 'JEDI' and 'Rules'. Última edición por Magician^ fecha: 30-03-2004 a las 07:03:45. |
|
#7
|
||||
|
||||
|
leandro_tami, me parece que "ASCIIZ" se escribe ASCII (American Simple Characters for no me acuerdo qué). Es posible que esté equivocado. Te digo esto por si alguna vez tienes que hacer una búsqueda, para que te sea más efectiva.
__________________
:) |
![]() |
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
|