| | |
function lowcase(s: string): string;
Please support our Pascal and Delphi advertiser: Programming Forums - DaniWeb Sister Site
A simple function that converts alphabetic values into their respective lowercase value.
function lowcase(s: string): string; var i: integer; begin s := upcase(s); for i := 1 to length(s) do begin if s[i] in ['A'..'z'] then // this is to check that s[i] is alphabetic begin s[i] := chr(ord(s[i]) + 32); // convert s[i] to a numeric value, then + 32 to it, and convert the final numeric value into a char end; end; lowcase := s; end;
Similar Threads
- string to vector<string> and splitting a string. Need help! (C++)
- Code Snippet: C++ Function 'stod': String-to-Double (convert a string to a double) (C++)
- Which C++ string function returns nth character of the string? (C++)
- Function for a string (C)
- no matching function for call to 'strcmp(std::string&, std::string&)' (C++)
| Thread Tools | Search this Thread |
Tag cloud for Pascal and Delphi



