Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-uwp
Commits
0d1dcc9f
Commit
0d1dcc9f
authored
Oct 20, 2017
by
atraczyk
Committed by
Adrien Béraud
Aug 07, 2018
Browse files
fallback avatar: fix getUpperInitial to skip spaces if any
Change-Id: I8446fc7a88c8c1b2a5a76cf6ad60f8fc8e784a4f
parent
cef2cb62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Utils.h
View file @
0d1dcc9f
...
...
@@ -336,14 +336,17 @@ TrimCmd(Platform::String^ s)
String
^
getUpperInitial
(
String
^
str
)
{
if
(
str
!=
nullptr
||
str
!=
""
)
{
std
::
wstring
s
(
str
->
Data
());
auto
it
=
str
->
Begin
();
wchar_t
ch
[]
=
L" "
;
ch
[
0
]
=
towupper
(
it
[
0
]);
return
ref
new
String
(
ch
);
if
(
str
==
nullptr
||
str
==
""
)
{
return
"?"
;
}
return
"?"
;
auto
it
=
str
->
Begin
();
wchar_t
ch
[]
=
L" "
;
int
index
=
0
;
ch
[
0
]
=
towupper
(
*
it
++
);
while
(
it
!=
str
->
End
()
&&
ch
[
0
]
==
' '
)
{
ch
[
0
]
=
towupper
(
*
it
++
);
}
return
ref
new
String
(
ch
);
}
Platform
::
String
^
...
...
Write
Preview
Supports
Markdown
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