@@ -2705,10 +2705,25 @@ { return decomposedString(self, of_unicode_decomposition_compat_table, OF_UNICODE_DECOMPOSITION_COMPAT_TABLE_SIZE); } #endif + +#ifdef OF_WINDOWS +- (OFString *)stringByExpandingWindowsEnvironmentStrings +{ + wchar_t buffer[512]; + size_t length; + + if ((length = ExpandEnvironmentStringsW(self.UTF16String, buffer, + sizeof(buffer))) == 0) + return self; + + return [OFString stringWithUTF16String: buffer + length: length - 1]; +} +#endif #ifdef OF_HAVE_FILES - (void)writeToFile: (OFString *)path { [self writeToFile: path