ObjFW  Diff

Differences From Artifact [1cad4eddab]:

To Artifact [1a087004fb]:


2703
2704
2705
2706
2707
2708
2709















2710
2711
2712
2713
2714
2715
2716

- (OFString *)decomposedStringWithCompatibilityMapping
{
	return decomposedString(self, of_unicode_decomposition_compat_table,
	    OF_UNICODE_DECOMPOSITION_COMPAT_TABLE_SIZE);
}
#endif
















#ifdef OF_HAVE_FILES
- (void)writeToFile: (OFString *)path
{
	[self writeToFile: path
		 encoding: OF_STRING_ENCODING_UTF_8];
}







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731

- (OFString *)decomposedStringWithCompatibilityMapping
{
	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
		 encoding: OF_STRING_ENCODING_UTF_8];
}