Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Mohammed Sadiq
chatty
Commits
cab1d799
Commit
cab1d799
authored
Nov 01, 2019
by
Andrea Schaefer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add /r to strsplit delimiters
parent
16980184
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
src/chatty-buddy-list.c
src/chatty-buddy-list.c
+1
-1
src/chatty-utils.c
src/chatty-utils.c
+2
-2
src/chatty-utils.h
src/chatty-utils.h
+1
-1
No files found.
src/chatty-buddy-list.c
View file @
cab1d799
...
...
@@ -1490,7 +1490,7 @@ chatty_blist_chats_update_node (PurpleBuddy *buddy,
tag
,
last_message_striped
);
last_msg
=
chatty_utils_strip_
newlines
(
last_msg_text
);
last_msg
=
chatty_utils_strip_
cr_lf
(
last_msg_text
);
last_msg_ts
=
chatty_utils_time_ago_in_words
(
chatty_node
->
conv
.
last_msg_ts_raw
,
CHATTY_UTILS_TIME_AGO_SHOW_DATE
);
...
...
src/chatty-utils.c
View file @
cab1d799
...
...
@@ -206,12 +206,12 @@ chatty_utils_strip_blanks (const char *string)
char
*
chatty_utils_strip_
newlines
(
const
char
*
string
)
chatty_utils_strip_
cr_lf
(
const
char
*
string
)
{
char
*
result
;
char
**
chunks
;
chunks
=
g_strsplit
(
string
,
"
\n
"
,
0
);
chunks
=
g_strsplit
_set
(
string
,
"
\
r\
n
"
,
0
);
result
=
g_strjoinv
(
" "
,
chunks
);
...
...
src/chatty-utils.h
View file @
cab1d799
...
...
@@ -20,7 +20,7 @@ typedef enum {
char
*
chatty_utils_jabber_id_strip
(
const
char
*
name
);
char
*
chatty_utils_strip_blanks
(
const
char
*
string
);
char
*
chatty_utils_strip_
newlines
(
const
char
*
string
);
char
*
chatty_utils_strip_
cr_lf
(
const
char
*
string
);
char
*
chatty_utils_format_phonenumber
(
const
char
*
phone_number
);
void
chatty_utils_generate_uuid
(
char
**
uuid
);
char
*
chatty_utils_time_ago_in_words
(
time_t
time_stamp
,
ChattyTimeAgoFlags
flags
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment