Use last_index_of instead of index_of
This commit is contained in:
parent
4a3306b479
commit
3dd19fad71
|
@ -60,7 +60,7 @@ public class Util {
|
||||||
#if _WIN32
|
#if _WIN32
|
||||||
string fileName = fileInfo.get_name();
|
string fileName = fileInfo.get_name();
|
||||||
int fileNameLength = fileName.length;
|
int fileNameLength = fileName.length;
|
||||||
int extIndex = fileName.index_of(".");
|
int extIndex = fileName.last_index_of(".");
|
||||||
if (extIndex < fileNameLength)
|
if (extIndex < fileNameLength)
|
||||||
{
|
{
|
||||||
string extension = fileName.substring(extIndex, fileNameLength - extIndex);
|
string extension = fileName.substring(extIndex, fileNameLength - extIndex);
|
||||||
|
|
Loading…
Reference in a new issue