-
Notifications
You must be signed in to change notification settings - Fork 7
Домашнее задание: Побитовые операции #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lesandl
wants to merge
2
commits into
bugslayer312:master
Choose a base branch
from
lesandl:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio 14 | ||
| VisualStudioVersion = 14.0.25420.1 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Bitwise", "Bitwise\Bitwise.vcxproj", "{C310D1CC-A4C8-4F47-B70F-A49FF3C1F6C5}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|x64 = Debug|x64 | ||
| Debug|x86 = Debug|x86 | ||
| Release|x64 = Release|x64 | ||
| Release|x86 = Release|x86 | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {C310D1CC-A4C8-4F47-B70F-A49FF3C1F6C5}.Debug|x64.ActiveCfg = Debug|x64 | ||
| {C310D1CC-A4C8-4F47-B70F-A49FF3C1F6C5}.Debug|x64.Build.0 = Debug|x64 | ||
| {C310D1CC-A4C8-4F47-B70F-A49FF3C1F6C5}.Debug|x86.ActiveCfg = Debug|Win32 | ||
| {C310D1CC-A4C8-4F47-B70F-A49FF3C1F6C5}.Debug|x86.Build.0 = Debug|Win32 | ||
| {C310D1CC-A4C8-4F47-B70F-A49FF3C1F6C5}.Release|x64.ActiveCfg = Release|x64 | ||
| {C310D1CC-A4C8-4F47-B70F-A49FF3C1F6C5}.Release|x64.Build.0 = Release|x64 | ||
| {C310D1CC-A4C8-4F47-B70F-A49FF3C1F6C5}.Release|x86.ActiveCfg = Release|Win32 | ||
| {C310D1CC-A4C8-4F47-B70F-A49FF3C1F6C5}.Release|x86.Build.0 = Release|Win32 | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| EndGlobal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| https://github.com/bugslayer312/StudentHomeworks/pull/17 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| // Bitwise.cpp : Defines the entry point for the console application. | ||
| // | ||
|
|
||
| #include "stdafx.h" | ||
| #include <string.h> | ||
| #include <stdlib.h> | ||
| #include <iostream> | ||
|
|
||
| typedef unsigned int uint_32; | ||
| void PrintHtml(char const* string, int style); | ||
| uint_32 TextParameters(char* str); | ||
| void ParagraphParameters(uint_32 flag); | ||
|
|
||
|
|
||
| int main() | ||
| { | ||
| PrintHtml("Hello", 7); | ||
| PrintHtml("Hello, World", 3); | ||
|
|
||
| char str1[] = "<B><I><U><horalign=\"center\"><font size=\"32\">Hello, World<\font size><\horalign><\U><\I><\B>"; | ||
| printf("\n\n%s\n", str1); | ||
| printf("Flags of the string: %X\n\n", TextParameters(str1)); | ||
|
|
||
| ParagraphParameters(0x1207); | ||
| ParagraphParameters(0x5221); | ||
| ParagraphParameters(0x631F); | ||
| printf("\n"); | ||
| ParagraphParameters(TextParameters(str1)); | ||
|
|
||
| return 0; | ||
| } | ||
|
|
||
|
|
||
| void PrintHtml(char const* string, int style) | ||
| { | ||
| //0001 - Underline, 0010 - Italic, 0100 - Bold | ||
| char *str = new char[128]; | ||
| strcpy(str, string); | ||
| printf("%s\n", str); | ||
| if (style & 01) | ||
| strrev(strcat(strrev(strcat(str, "</U>")), ">U<")); | ||
| if (style & 02) | ||
| strrev(strcat(strrev(strcat(str, "</I>")), ">I<")); | ||
| if (style & 04) | ||
| strrev(strcat(strrev(strcat(str, "</B>")), ">B<")); | ||
| printf("%s\n", str); | ||
| delete[] str; | ||
|
|
||
| } | ||
|
|
||
| uint_32 TextParameters(char* str) | ||
| { | ||
| //0x0001 - Bold, 0x0002 - Italic, 0x0004 - Underline, HorAlign | ||
| //HorAlign: 0x0000 - Left, 0x0010 - Center, 0x0020 - Right, 0x0030 - Justify | ||
| //0x0100 - 0x6400 Font size | ||
| uint_32 flag = 0x00; | ||
| char str_int[4] = ""; | ||
| if (strstr(str, "<B>")) | ||
| flag = flag | 0x01; | ||
| if (strstr(str, "<I>")) | ||
| flag = flag | 0x02; | ||
| if (strstr(str, "<U>")) | ||
| flag = flag | 0x04; | ||
| if (strstr(str, "horalign=\"center\"")) | ||
| flag = flag | 0x10; | ||
| else | ||
| if (strstr(str, "horalign=\"righr\"")) | ||
| flag = flag | 0x20; | ||
| else | ||
| if (strstr(str, "horalign=\"justify\"")) | ||
| flag = flag | 0x30; | ||
| str = strpbrk(strstr(str, "font size"), "0123456789"); | ||
| int fontsize = atoi(strncpy(str_int, str, strspn(str, "0123456789"))); | ||
| flag = flag | uint_32((fontsize << 8)); | ||
| //printf("%X\n", flag); | ||
|
|
||
| return flag; | ||
| } | ||
|
|
||
| void ParagraphParameters(uint_32 flag) | ||
| { | ||
| //0x0001 - Bold, 0x0002 - Italic, 0x0004 - Underline, HorAlign | ||
| //HorAlign: 0x0000 - Left, 0x0010 - Center, 0x0020 - Right, 0x0030 - Justify | ||
| //0x0100 - 0x6400 Font size | ||
|
|
||
| printf("\nFlags: %X\n", flag); | ||
| printf("Parameters of the Paragraph: \n"); | ||
| if (flag & 0x01) | ||
| printf("Bold\n"); | ||
| if (flag & 0x02) | ||
| printf("Italic\n"); | ||
| if (flag & 0x04) | ||
| printf("Underline\n"); | ||
|
|
||
| switch (flag & 0x30) | ||
| { | ||
| case 0x00: | ||
| printf("HorAlign: Left\n"); | ||
| break; | ||
| case 0x10: | ||
| printf("HorAlign: Center\n"); | ||
| break; | ||
| case 0x20: | ||
| printf("HorAlign: Right\n"); | ||
| break; | ||
| case 0x30: | ||
| printf("HorAlign: Justify\n"); | ||
| } | ||
|
|
||
| printf("Font size: %d\n", (flag >> 8) & 0xFF); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,158 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <ItemGroup Label="ProjectConfigurations"> | ||
| <ProjectConfiguration Include="Debug|Win32"> | ||
| <Configuration>Debug</Configuration> | ||
| <Platform>Win32</Platform> | ||
| </ProjectConfiguration> | ||
| <ProjectConfiguration Include="Release|Win32"> | ||
| <Configuration>Release</Configuration> | ||
| <Platform>Win32</Platform> | ||
| </ProjectConfiguration> | ||
| <ProjectConfiguration Include="Debug|x64"> | ||
| <Configuration>Debug</Configuration> | ||
| <Platform>x64</Platform> | ||
| </ProjectConfiguration> | ||
| <ProjectConfiguration Include="Release|x64"> | ||
| <Configuration>Release</Configuration> | ||
| <Platform>x64</Platform> | ||
| </ProjectConfiguration> | ||
| </ItemGroup> | ||
| <PropertyGroup Label="Globals"> | ||
| <ProjectGuid>{C310D1CC-A4C8-4F47-B70F-A49FF3C1F6C5}</ProjectGuid> | ||
| <Keyword>Win32Proj</Keyword> | ||
| <RootNamespace>Bitwise</RootNamespace> | ||
| <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> | ||
| </PropertyGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | ||
| <ConfigurationType>Application</ConfigurationType> | ||
| <UseDebugLibraries>true</UseDebugLibraries> | ||
| <PlatformToolset>v140</PlatformToolset> | ||
| <CharacterSet>Unicode</CharacterSet> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | ||
| <ConfigurationType>Application</ConfigurationType> | ||
| <UseDebugLibraries>false</UseDebugLibraries> | ||
| <PlatformToolset>v140</PlatformToolset> | ||
| <WholeProgramOptimization>true</WholeProgramOptimization> | ||
| <CharacterSet>Unicode</CharacterSet> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | ||
| <ConfigurationType>Application</ConfigurationType> | ||
| <UseDebugLibraries>true</UseDebugLibraries> | ||
| <PlatformToolset>v140</PlatformToolset> | ||
| <CharacterSet>Unicode</CharacterSet> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | ||
| <ConfigurationType>Application</ConfigurationType> | ||
| <UseDebugLibraries>false</UseDebugLibraries> | ||
| <PlatformToolset>v140</PlatformToolset> | ||
| <WholeProgramOptimization>true</WholeProgramOptimization> | ||
| <CharacterSet>Unicode</CharacterSet> | ||
| </PropertyGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
| <ImportGroup Label="ExtensionSettings"> | ||
| </ImportGroup> | ||
| <ImportGroup Label="Shared"> | ||
| </ImportGroup> | ||
| <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| </ImportGroup> | ||
| <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| </ImportGroup> | ||
| <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| </ImportGroup> | ||
| <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| </ImportGroup> | ||
| <PropertyGroup Label="UserMacros" /> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
| <LinkIncremental>true</LinkIncremental> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
| <LinkIncremental>true</LinkIncremental> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
| <LinkIncremental>false</LinkIncremental> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
| <LinkIncremental>false</LinkIncremental> | ||
| </PropertyGroup> | ||
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
| <ClCompile> | ||
| <PrecompiledHeader> | ||
| </PrecompiledHeader> | ||
| <WarningLevel>Level3</WarningLevel> | ||
| <Optimization>Disabled</Optimization> | ||
| <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| </ClCompile> | ||
| <Link> | ||
| <SubSystem>Console</SubSystem> | ||
| <GenerateDebugInformation>true</GenerateDebugInformation> | ||
| </Link> | ||
| </ItemDefinitionGroup> | ||
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
| <ClCompile> | ||
| <PrecompiledHeader> | ||
| </PrecompiledHeader> | ||
| <WarningLevel>Level3</WarningLevel> | ||
| <Optimization>Disabled</Optimization> | ||
| <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| </ClCompile> | ||
| <Link> | ||
| <SubSystem>Console</SubSystem> | ||
| <GenerateDebugInformation>true</GenerateDebugInformation> | ||
| </Link> | ||
| </ItemDefinitionGroup> | ||
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
| <ClCompile> | ||
| <WarningLevel>Level3</WarningLevel> | ||
| <PrecompiledHeader> | ||
| </PrecompiledHeader> | ||
| <Optimization>MaxSpeed</Optimization> | ||
| <FunctionLevelLinking>true</FunctionLevelLinking> | ||
| <IntrinsicFunctions>true</IntrinsicFunctions> | ||
| <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| </ClCompile> | ||
| <Link> | ||
| <SubSystem>Console</SubSystem> | ||
| <EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
| <OptimizeReferences>true</OptimizeReferences> | ||
| <GenerateDebugInformation>true</GenerateDebugInformation> | ||
| </Link> | ||
| </ItemDefinitionGroup> | ||
| <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
| <ClCompile> | ||
| <WarningLevel>Level3</WarningLevel> | ||
| <PrecompiledHeader> | ||
| </PrecompiledHeader> | ||
| <Optimization>MaxSpeed</Optimization> | ||
| <FunctionLevelLinking>true</FunctionLevelLinking> | ||
| <IntrinsicFunctions>true</IntrinsicFunctions> | ||
| <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| </ClCompile> | ||
| <Link> | ||
| <SubSystem>Console</SubSystem> | ||
| <EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
| <OptimizeReferences>true</OptimizeReferences> | ||
| <GenerateDebugInformation>true</GenerateDebugInformation> | ||
| </Link> | ||
| </ItemDefinitionGroup> | ||
| <ItemGroup> | ||
| <Text Include="ReadMe.txt" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClInclude Include="stdafx.h" /> | ||
| <ClInclude Include="targetver.h" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClCompile Include="Bitwise.cpp" /> | ||
| <ClCompile Include="stdafx.cpp" /> | ||
| </ItemGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
| <ImportGroup Label="ExtensionTargets"> | ||
| </ImportGroup> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <ItemGroup> | ||
| <Filter Include="Source Files"> | ||
| <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> | ||
| <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> | ||
| </Filter> | ||
| <Filter Include="Header Files"> | ||
| <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> | ||
| <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions> | ||
| </Filter> | ||
| <Filter Include="Resource Files"> | ||
| <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> | ||
| <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> | ||
| </Filter> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <Text Include="ReadMe.txt" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClInclude Include="stdafx.h"> | ||
| <Filter>Header Files</Filter> | ||
| </ClInclude> | ||
| <ClInclude Include="targetver.h"> | ||
| <Filter>Header Files</Filter> | ||
| </ClInclude> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClCompile Include="stdafx.cpp"> | ||
| <Filter>Source Files</Filter> | ||
| </ClCompile> | ||
| <ClCompile Include="Bitwise.cpp"> | ||
| <Filter>Source Files</Filter> | ||
| </ClCompile> | ||
| </ItemGroup> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| ======================================================================== | ||
| CONSOLE APPLICATION : Bitwise Project Overview | ||
| ======================================================================== | ||
|
|
||
| AppWizard has created this Bitwise application for you. | ||
|
|
||
| This file contains a summary of what you will find in each of the files that | ||
| make up your Bitwise application. | ||
|
|
||
|
|
||
| Bitwise.vcxproj | ||
| This is the main project file for VC++ projects generated using an Application Wizard. | ||
| It contains information about the version of Visual C++ that generated the file, and | ||
| information about the platforms, configurations, and project features selected with the | ||
| Application Wizard. | ||
|
|
||
| Bitwise.vcxproj.filters | ||
| This is the filters file for VC++ projects generated using an Application Wizard. | ||
| It contains information about the association between the files in your project | ||
| and the filters. This association is used in the IDE to show grouping of files with | ||
| similar extensions under a specific node (for e.g. ".cpp" files are associated with the | ||
| "Source Files" filter). | ||
|
|
||
| Bitwise.cpp | ||
| This is the main application source file. | ||
|
|
||
| ///////////////////////////////////////////////////////////////////////////// | ||
| Other standard files: | ||
|
|
||
| StdAfx.h, StdAfx.cpp | ||
| These files are used to build a precompiled header (PCH) file | ||
| named Bitwise.pch and a precompiled types file named StdAfx.obj. | ||
|
|
||
| ///////////////////////////////////////////////////////////////////////////// | ||
| Other notes: | ||
|
|
||
| AppWizard uses "TODO:" comments to indicate parts of the source code you | ||
| should add to or customize. | ||
|
|
||
| ///////////////////////////////////////////////////////////////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| // stdafx.cpp : source file that includes just the standard includes | ||
| // Bitwise.pch will be the pre-compiled header | ||
| // stdafx.obj will contain the pre-compiled type information | ||
|
|
||
| #include "stdafx.h" | ||
|
|
||
| // TODO: reference any additional headers you need in STDAFX.H | ||
| // and not in this file |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Может так:
strrev(strcat(strrev(strcat(str, "</U>")), "<U>"));?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
пробовал так. Но реверс как-то странно переворачивает угловые скобки. Поэтому чтобы конечный результат получился верным, пришлось сделать именно так:
strrev(strcat(strrev(strcat(str, "")), ">U<"));