- Timestamp:
- 2015-01-16T19:50:25Z (10 years ago)
- Branches:
- master
- Children:
- ecbd22a
- Parents:
- 4cff28f
- Location:
- lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/misc.c
r4cff28f rfed4f76 780 780 return NULL; 781 781 } 782 783 /* Takes a string, truncates it where it's safe, returns the new length */ 784 int truncate_utf8( char *string, int maxlen ) 785 { 786 char *end; 787 g_utf8_validate( (const gchar *) string, maxlen, (const gchar **) &end ); 788 *end = '\0'; 789 return end - string; 790 } -
lib/misc.h
r4cff28f rfed4f76 150 150 G_MODULE_EXPORT char **split_command_parts( char *command, int limit ); 151 151 G_MODULE_EXPORT char *get_rfc822_header( const char *text, const char *header, int len ); 152 G_MODULE_EXPORT int truncate_utf8( char *string, int maxlen ); 152 153 153 154 #endif
Note: See TracChangeset
for help on using the changeset viewer.