如何解析字符串转换在C日期时间结构? [英] How to parse a string into a datetime struct in C?
本文介绍了如何解析字符串转换在C日期时间结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想有一个字符串(字符*)解析成C. tm结构是否有任何内置功能来做到这一点?
I would like to have a string (char*) parsed into a tm struct in C. Is there any built-in function to do that?
我指的是ANSI C的C99标准。
I am referring to ANSI C in C99 Standard.
推荐答案
虽然POSIX有<一个href=\"http://www.opengroup.org/onlinepubs/009695399/functions/strptime.html\"><$c$c>strptime()$c$c>,我不相信有一种方法在标准C做到这一点。
While POSIX has strptime()
, I don't believe there is a way to do this in standard C.
这篇关于如何解析字符串转换在C日期时间结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文