Changeset 69 for trunk/src/helpers/stringh.c
- Timestamp:
- May 19, 2001, 3:47:20 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/stringh.c
r56 r69 1115 1115 *@@ strhBeautifyTitle: 1116 1116 * replaces all line breaks (0xd, 0xa) with spaces. 1117 * 1118 *@@changed V0.9.12 (2001-05-17) [pr]: multiple line break chars. end up as only 1 space 1117 1119 */ 1118 1120 … … 1120 1122 { 1121 1123 BOOL rc = FALSE; 1122 CHAR *p; 1123 while ((p = strchr(psz, 0xa))) 1124 { 1125 *p = ' '; 1126 rc = TRUE; 1127 } 1128 while ((p = strchr(psz, 0xd))) 1129 { 1130 *p = ' '; 1131 rc = TRUE; 1132 } 1124 CHAR *p = psz; 1125 1126 while(*p) 1127 if ( (*p == '\r') 1128 || (*p == '\n') 1129 ) 1130 { 1131 rc = TRUE; 1132 if ( (p != psz) 1133 && (p[-1] == ' ') 1134 ) 1135 memmove(p, p + 1, strlen(p)); 1136 else 1137 *p++ = ' '; 1138 } 1139 else 1140 p++; 1141 1133 1142 return (rc); 1134 1143 }
Note:
See TracChangeset
for help on using the changeset viewer.