mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
(scm_string_capitalize_x): Treat characters as unsigned so that 8-bit
chars work. Thanks to David Pirotte!
This commit is contained in:
parent
1d15ecd303
commit
ff0a837c20
1 changed files with 2 additions and 2 deletions
|
@ -410,12 +410,12 @@ SCM_DEFINE (scm_string_downcase, "string-downcase", 1, 0, 0,
|
||||||
static SCM
|
static SCM
|
||||||
string_capitalize_x (SCM str)
|
string_capitalize_x (SCM str)
|
||||||
{
|
{
|
||||||
char *sz;
|
unsigned char *sz;
|
||||||
long i, len;
|
long i, len;
|
||||||
int in_word=0;
|
int in_word=0;
|
||||||
|
|
||||||
len = SCM_STRING_LENGTH(str);
|
len = SCM_STRING_LENGTH(str);
|
||||||
sz = SCM_STRING_CHARS (str);
|
sz = SCM_STRING_UCHARS (str);
|
||||||
for(i=0; i<len; i++) {
|
for(i=0; i<len; i++) {
|
||||||
if (!SCM_FALSEP (scm_char_alphabetic_p (SCM_MAKE_CHAR (sz[i])))) {
|
if (!SCM_FALSEP (scm_char_alphabetic_p (SCM_MAKE_CHAR (sz[i])))) {
|
||||||
if(!in_word) {
|
if(!in_word) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue