Ver Mensaje Individual
  #4  
Antiguo 05-11-2007
Avatar de ContraVeneno
ContraVeneno ContraVeneno is offline
Miembro
 
Registrado: may 2005
Ubicación: Torreón, México
Posts: 4.738
Reputación: 24
ContraVeneno Va por buen camino
pues nada más fácil que presionar F1 y ver el ejemplo que te muestra la ayuda de delphi...

Cita:
Empezado por F1_Delphi
RightStr Routine Returns the substring of a specified length that appears at the end of a string.
Unit StrUtils

Syntax
function RightStr(const AText: string; const ACount: Integer): string; overload;

function RightStr(const AText: WideString; const ACount: Integer): WideString; overload;

Description RightStr returns the trailing characters of AText up to a length of ACount characters. Thus, for example, if AText is the string "Programmer" and ACount is 7, RightStr returns the string "grammer".
o sea que, le pasas dos parámetros, la cadena y cuantos caracteres quieres... como en tu caso solamente requieres el último, podrías hacer:

Código Delphi [-]
RigthStr(TuCadena, 1);

//O para ser más exactos:
RigthStr(Trim(TuCadena), 1);


¿que para que sirve la función "Trim"? Presionando F1 en Delphi, podrás ver la definición y uno que otro ejemplo.

Saludos
__________________


Última edición por ContraVeneno fecha: 05-11-2007 a las 22:02:10.
Responder Con Cita