strptime(),相当于在Windows?

编程入门 行业动态 更新时间:2024-10-10 07:25:28
本文介绍了strptime(),相当于在Windows?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否有一个良好相当于实施 strptime()的可用于Windows?不幸的是,这POSIX函数似乎没有可用

Is there a good equivalent implementation of strptime() available for Windows? Unfortunately, this POSIX function does not appear to be available.

公开组strptime 的描述 - 总结:它的文本字符串转换,如MM-DD-YYYY HH:MM:SS到 tm结构,的strftime()。

Open Group description of strptime - summary: it converts a text string such as "MM-DD-YYYY HH:MM:SS" into a tm struct, the opposite of strftime().

推荐答案

的一个开源版本(BSD许可证)strptime()可以在这里找到:cvswebbsd/bsdweb.cgi/src/lib/libc/time/strptime.c?rev=HEAD

您需要添加下面的声明使用它:

You'll need to add the following declaration to use it:

char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict);

更多推荐

strptime(),相当于在Windows?

本文发布于:2023-11-26 23:44:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1635692.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:strptime   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!